Return-Path: X-Original-To: apmail-systemml-dev-archive@minotaur.apache.org Delivered-To: apmail-systemml-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27D9A18068 for ; Sat, 2 Jan 2016 20:25:27 +0000 (UTC) Received: (qmail 65513 invoked by uid 500); 2 Jan 2016 20:25:27 -0000 Delivered-To: apmail-systemml-dev-archive@systemml.apache.org Received: (qmail 65467 invoked by uid 500); 2 Jan 2016 20:25:27 -0000 Mailing-List: contact dev-help@systemml.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@systemml.incubator.apache.org Delivered-To: mailing list dev@systemml.incubator.apache.org Received: (qmail 65456 invoked by uid 99); 2 Jan 2016 20:25:26 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Jan 2016 20:25:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4B44CC04DB for ; Sat, 2 Jan 2016 20:25:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.424 X-Spam-Level: **** X-Spam-Status: No, score=4.424 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, MIME_HEADER_CTYPE_ONLY=1.996, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.554, SPF_PASS=-0.001, TVD_FW_GRAPHIC_NAME_MID=0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id PXUzrkNSs51Y for ; Sat, 2 Jan 2016 20:25:14 +0000 (UTC) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 8536D428DB for ; Sat, 2 Jan 2016 20:25:14 +0000 (UTC) Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 2 Jan 2016 13:25:14 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sat, 2 Jan 2016 13:25:12 -0700 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: mboehm@us.ibm.com X-IBM-RcptTo: dev@systemml.incubator.apache.org Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 08E8A3E40030 for ; Sat, 2 Jan 2016 13:25:11 -0700 (MST) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u02KPBJV30277876 for ; Sat, 2 Jan 2016 20:25:11 GMT Received: from d01av02.pok.ibm.com (localhost [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u02KPBQq002140 for ; Sat, 2 Jan 2016 15:25:11 -0500 Received: from d50lp31.co.us.ibm.com (d50lp31.boulder.ibm.com [9.17.249.32]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u02KPAwe002085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sat, 2 Jan 2016 15:25:10 -0500 Message-Id: <201601022025.u02KPAwe002085@d01av02.pok.ibm.com> Received: from localhost by d50lp31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 2 Jan 2016 13:25:10 -0700 Received: from smtp.notes.na.collabserv.com (192.155.248.67) by d50lp31.co.us.ibm.com (192.168.2.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256/256) Sat, 2 Jan 2016 13:25:07 -0700 X-IBM-Helo: smtp.notes.na.collabserv.com X-IBM-MailFrom: mboehm@us.ibm.com X-IBM-RcptTo: dev@systemml.incubator.apache.org Received: from /spool/local by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Sat, 2 Jan 2016 20:25:06 -0000 Received: from us1a3-smtp04.a3.dal06.isc4sb.com (10.106.154.237) by smtp.notes.na.collabserv.com (10.106.227.16) with smtp.notes.na.collabserv.com ESMTP; Sat, 2 Jan 2016 20:25:04 -0000 Received: from us1a3-mail149.a3.dal06.isc4sb.com ([10.146.38.84]) by us1a3-smtp04.a3.dal06.isc4sb.com with ESMTP id 2016010220250301-65896 ; Sat, 2 Jan 2016 20:25:03 +0000 In-Reply-To: Subject: Re: POC Eclipse IDE for DML To: dev@systemml.incubator.apache.org From: "Matthias Boehm" Date: Sat, 2 Jan 2016 12:25:04 -0800 References: X-KeepSent: 7EFCEE76:4AA25389-00257F2E:006F330F; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP2 SHF37 August 25, 2014 X-LLNOutbound: False X-Disclaimed: 38979 X-TNEFEvaluated: 1 Content-type: multipart/related; Boundary="0__=8FBBF5BDDFFCB59F8f9e8a93df938690918c8FBBF5BDDFFCB59F" x-cbid: 16010220-0009-0000-0000-000011084014 X-IBM-ISS-SpamDetectors: Score=0.394815; BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.394815; ST=0; TS=0; UL=0; ISC= X-IBM-ISS-DetailInfo: BY=3.00004743; HX=3.00000237; KW=3.00000007; PH=3.00000004; SC=3.00000129; SDB=6.00639573; UDB=6.00287644; UTC=2016-01-02 20:25:05 x-cbparentid: 16010220-5938-0000-0000-0000017F59A0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER --0__=8FBBF5BDDFFCB59F8f9e8a93df938690918c8FBBF5BDDFFCB59F Content-type: multipart/alternative; Boundary="1__=8FBBF5BDDFFCB59F8f9e8a93df938690918c8FBBF5BDDFFCB59F" --1__=8FBBF5BDDFFCB59F8f9e8a93df938690918c8FBBF5BDDFFCB59F Content-Transfer-Encoding: quoted-printable Content-type: text/plain; charset=US-ASCII just to clarify, our parser grammar does not include builtin functions because they are -- in contrast to keywords and language constructs -- not part of the DML/PyDML syntax. This is important for both maintainability and flexibility. For example, it allows you to define a variable or user-defined function with the name 't' although there exists a builtin function t() for transpose operations. Regards, Matthias From: Deron Eriksson To: dev@systemml.incubator.apache.org Date: 01/01/2016 11:38 AM Subject: Re: POC Eclipse IDE for DML 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 issue)? Deron 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. > > https://github.com/nakul02/sysml.dml > > Grammar File : > > https://github.com/nakul02/sysml.dml/blob/master/sysml.dml/src/sysml/Dml.xt= ext > > Here are some screenshots: > http://imgur.com/a/ZJyg7 > > The files shown are from the algorithms folder. > https://github.com/apache/incubator-systemml/tree/master/scripts/algorithms > > (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 : > > https://github.com/nakul02/sysml.dml/blob/master/sysml.dml/src/sysml/Dml.xt= ext > ) > > 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 > https://github.com/nakul02/ > --1__=8FBBF5BDDFFCB59F8f9e8a93df938690918c8FBBF5BDDFFCB59F Content-Transfer-Encoding: quoted-printable Content-type: text/html; charset=US-ASCII Content-Disposition: inline

just to clarify, our parser grammar does not include builtin= functions because they are -- in contrast to keywords and language constru= cts -- not part of the DML/PyDML syntax. This is important for both maintai= nability and flexibility. For example, it allows you to define a variable o= r user-defined function with the name 't' although there exists a builtin f= unction t() for transpose operations.

Regards,
Matthias

=
3D"InactiveDeron Eriksson ---01/01/2016= 11:38:27 AM---Hi Nakul, This is very cool! I see great value in IDE tools = such as an Eclipse editor

= From: Deron Eriksson <deroneriksson@gmail= .com>
To: dev@systemml.incubator.apache.org
Date: 01/01/2016 11:38 AM<= /font>
Subject: Re: POC Eclipse IDE for DML





Hi Naku= l,

This is very cool! I see great value in IDE tools such as an Ecli= pse 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 f= lushed 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 v= ery powerful and useful but I have a
harder time understanding the langu= age 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 w= ork 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
issue)?

Deron



On Mon, De= c 21, 2015 at 2:44 PM, Nakul Jindal <nakul02@gmail.com> wrote:
> Hi,
>
> I've been trying to build a Proof of Concept IDE = for DML using Xtext.
>
>
https://github.com/nakul02/sysml.dml
&g= t;
> Grammar File :
>
>
https://= github.com/nakul02/sysml.dml/blob/master/sysml.dml/src/sysml/Dml.xtext<= /tt>
>
> Here are some screenshots:
>
http://imgur.com/a/ZJyg7
>= ;
> The files shown are from the algorithms folder.
>
= https://github.com/apache/incubator-systemml/tree/master/scrip= ts/algorithms
>
> (There was no particular reason = to have chosen these files over others)
>
> For this POC, my on= ly 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 i= t for
> Xtext.
>
> From the screenshots, you can see that= eclipse thinks there are syntactic
> errors in the files. This has t= o do with statements ending in an optional
> semicolon.
>
&g= t; I only supplied xtext a grammar file from which to generate the IDE. I h= ave
> 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 ca= n see in the grammar
> file :
>
>
https://github.com/nakul02/
>

=
--1__=8FBBF5BDDFFCB59F8f9e8a93df938690918c8FBBF5BDDFFCB59F-- --0__=8FBBF5BDDFFCB59F8f9e8a93df938690918c8FBBF5BDDFFCB59F--