Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » XText alternatives for DSL-2-JVM chain
XText alternatives for DSL-2-JVM chain [message #1767117] Sat, 01 July 2017 13:17 Go to next message
David BlackFriend
Messages: 33
Registered: June 2017
Member
Hi,

unfortunately I had to drop out a project I started in XText because of lack of support in XText/ANTL3 for Unicode beyond the Basic Multilangual Plane.

Can you suggest Eclipse-based alternatives to XText for the following scenario?

DSL source -> Abstract Semantic Model 1 -> Abstract Semantic Model 2 -> JVM bytecode

So, basically, I need to provide my client with an Eclipse-like IDE and a DSL language that, after certain (complicated) model-2-model tranformations, will compile into JVM bytecode.

Suggestions much appreciated!

David

EDIT: I am asking rather about the first part of the chain, the text-to-model one. I need a replacement for XText.

[Updated on: Sat, 01 July 2017 13:38]

Report message to a moderator

Re: XText alternatives for DSL-2-JVM chain [message #1767121 is a reply to message #1767117] Sat, 01 July 2017 13:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I still don't known what you mean by JVM byte code. Do you really plan to write you own byte code generator? If not, then write "-> Java".

The inadequacies of extended Unicode support in one tool are a fair indication of the state of the art. You can probably try something else and get exactly the same or worse problems.

You might consider a custom character encoder in which you map your extended Unicode characters to some simpler Unicodes that you can afford to sacrifice. In a year or two when tools improve you can just eliminate the map. If you really want all characters temporarily introduce an escape character analoguous to \t etc.

Regards

Ed Willink
Re: XText alternatives for DSL-2-JVM chain [message #1767123 is a reply to message #1767121] Sat, 01 July 2017 14:04 Go to previous message
David BlackFriend
Messages: 33
Registered: June 2017
Member
Thanks again. Your quick and insightful answers are saving me a lot of time and nerves! :)


Quote:
I still don't known what you mean by JVM byte code. Do you really plan to write you own byte code generator? If not, then write "-> Java".


That's indeed the long-term goal, JVM bytecode. I've done it in the past (using the ASM library), but not in the context of Eclipse Modeling Tools.

However, for the time being and a first prototype, I'll rather stand by Java or Scala code generation. So I will keep in mind your suggestion for being more precise when I write about my model-2-text step.

Quote:
The inadequacies of extended Unicode support in one tool are a fair indication of the state of the art. You can probably try something else and get exactly the same or worse problems.


Unfortunately I am beginning to see that you are right in this. I've been spending some hours looking for an alternative to XText without nothing free of similar problems or, as you say, worse flaws. I thought Spoofax might be the one to go with but it does not support Unicode at all.

Quote:
If you really want all characters temporarily introduce an escape character analoguous to \t etc.


Yes, that might be a way to go. If today I can't find any obvious alternative to XText (and most probably I won't), I will just add some escaping mechanism for unicode chars into grammar. Then I will probably hook in a first pre-processing tool before the ANTLR parsing entry point that will translate end-user-written extended unicode chars into those escaped sequences that XText/ANTLR can handle.

Cheers,

David
Previous Topic:newbie: seeking advice in toolchain selection
Next Topic:RDF Turtle code generation template
Goto Forum:
  


Current Time: Fri Apr 26 07:06:16 GMT 2024

Powered by FUDForum. Page generated in 0.04550 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top