systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Boehm" <>
Subject Re: parser.Token class and related exceptions
Date Wed, 16 Dec 2015 08:54:54 GMT

Hi Deron,

thanks for brining up this topic - I'm strongly in favor of this cleanup.
Originally, 'ParseException' was a JavaCC generated class and the purpose
of DMLParseException was to extend its functionality without modifying the
generated class. When we removed JavaCC we simplified ParseException but
did not merge these classes to keep changes local. However, I think it's a
good idea to clean this up now. Thanks.


From:	Deron Eriksson <>
Date:	12/16/2015 02:02 AM
Subject:	parser.Token class and related exceptions

I noticed the project contains the org.apache.sysml.parser.Token class,
which is an old JavaCC class that I believe is now obsolete since antlr is
used. The Token class itself is only referenced by
org.apache.sysml.parser.ParseException. The
org.apache.sysml.parser.DMLParseException (subclass of ParseException)
references the currentToken (Token) field of ParseException.

If the currentToken, expectedTokenSequences, and tokenImage fields are
removed from ParseException, the only code that requires further removal is
the small amount of code in DMLParseException that references currentToken,
which would seem to indicate that these fields aren't used and can be
removed. If those fields are removed, ParseException has no fields.

So, I was wondering the following:
(1) Can we remove the Token class and the three fields from ParseException
and remove the currentToken code from DMLParseException?
(2) Does ParseException have a different meaning and is it used differently
than DMLParseException, so they should be kept as separate classes, or can
they be combined into a single class?


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