systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deron Eriksson <>
Subject Re: POC Eclipse IDE for DML
Date Fri, 01 Jan 2016 19:38:04 GMT
Hi Nakul,

This is very cool! I see great value in IDE tools such as an Eclipse editor
for DML/PyDML. Highlighting syntax errors helps people catch syntax
mistakes before running the script, and IDE code completion is a great
productivity boost.

Also, I like how clean and readable the grammar is. I don't know how others
feel, but it is so clean that, if flushed out, it might be a useful
addition to the DML Language Reference. It does things such as enumerate
the built-in functions, which is handy when trying to wrap your mind around
the language. The Dml.g4 file is very powerful and useful but I have a
harder time understanding the language syntax when looking at it since
things like built-in functions aren't included in it. I wonder if there is
a way to integrate some of your work into Dml.g4?

I haven't done Xtext before. Do you have any advice to get started if I'd
like to try this out in my Eclipse (for instance, to look at the semicolon


On Mon, Dec 21, 2015 at 2:44 PM, Nakul Jindal <> wrote:

> Hi,
> I've been trying to build a Proof of Concept IDE for DML using Xtext.
> Grammar File :
> Here are some screenshots:
> The files shown are from the algorithms folder.
> (There was no particular reason to have chosen these files over others)
> For this POC, my only goal was to get syntax highlighting to work in
> Eclipse.
> SystemML DML grammar is written in ANTLRv4 whereas Xtext uses ANTLRv3. Some
> amount of work was needed on the grammar before it could be used it for
> Xtext.
> From the screenshots, you can see that eclipse thinks there are syntactic
> errors in the files. This has to do with statements ending in an optional
> semicolon.
> I only supplied xtext a grammar file from which to generate the IDE. I have
> not yet worked on the generated code to add any other features.
> I could not come up with a LL(*) grammar that would let me express optional
> semicolons at the end of statements. For the time being, the grammar
> requires semicolons at the end of statements (as you can see in the grammar
> file :
> )
> I discussed this problem with Fred(@frreiss) and he suggested 3 ways of
> dealing with this (assuming no way of modifying the grammar to fix this):
> 1. Support a subset of DML in the XText based tools
> 2. Modify the xtext generated tools to fix this
> 3. Write an eclipse plugin from scratch with complete control over lexer
> and parser (among other components)
> Option 1 requires the least amount of work.
> I am not sure between options 2 & 3, which would be more work.
> Is this useful to anyone?
> If so, are there any thoughts or suggestions on how to approach the
> optional semicolon problem?
> Nakul Jindal

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message