Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » XPAND parser exception contains wrong line number(org.eclipse.internal.xtend.xtend.parser.ParseException: no viable alternative at character '·' on line 9800291)
XPAND parser exception contains wrong line number [message #1828223] Thu, 04 June 2020 10:56 Go to next message
latha patil is currently offline latha patilFriend
Messages: 3
Registered: June 2020
Junior Member
Im using xpand to get a Template form a xpt file.
there are special characters in the file which is causing parser exception but xpand is sending wrong line number as part of exception message.

When debugged found that there is bug in class XpandParseFacade.java at line number 83 in createError method

e.line is passed as second parameter instead of as third parameter for SyntaxError constructor.

 protected static XtendError createError(final RecognitionException e, final String string) {
    if (e.token == null) {
      return new SyntaxError(e.index, e.line, e.index + 1, string);
    }
    final CommonToken t = (CommonToken) e.token;
    return new SyntaxError(t.getStartIndex(), t.getStopIndex(), t.getLine(), string);
  }
Re: XPAND parser exception contains wrong line number [message #1828247 is a reply to message #1828223] Thu, 04 June 2020 18:34 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Xpand is pretty dead, subsumed by the String Template functionality of Xtend.

Unfortunately Xtend, as a better Java, is dying though I hope its String Templates will live on somehow.

You can try making a patch available via GIT.

Regards

Edward Willink
Previous Topic:Increment of Int in while loop?
Next Topic:Importing a module from a plugin into a module of an Acceleo project
Goto Forum:
  


Current Time: Tue Apr 16 12:24:11 GMT 2024

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

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

Back to the top