Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Content-assist grammar has warnings while the main one has no
Content-assist grammar has warnings while the main one has no [message #1225133] Sat, 28 December 2013 21:27 Go to next message
Vincent Simonet is currently offline Vincent SimonetFriend
Messages: 8
Registered: March 2013
Junior Member
Hello,

The content-assist grammar for my DSL gets warning from the ANTLR parser generator for content assist (XtextAntlrUiGeneratorFragment), while there is no warning with the normal ANTLR parser generator (XtextAntlrGeneratorFragment).

Digging into the history of my project, it seems to me that the problem appeared when switching to Xtext 2.4 (though I'm not 100% sure).

* Are there any changes on this with Xtext 2.4?
* It is not clear to me how XtextAntlrUiGeneratorFragment is differing XtextAntlrGeneratorFragment? I had a look to the source code, but I do not see obviously different parameter for the grammar generation.
* The warning messages are difficult to track to the problem in the Xtext grammar. How can I more easily debug the issue?

Thanks.

--
Vincent
Re: Content-assist grammar has warnings while the main one has no [message #1225379 is a reply to message #1225133] Sun, 29 December 2013 16:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13661
Registered: July 2009
Senior Member
Hi,

how does a reproducable grammar look like? and how does your workflow look like? did you any configs e.g. backtracking?


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Content-assist grammar has warnings while the main one has no [message #1225578 is a reply to message #1225379] Mon, 30 December 2013 07:34 Go to previous messageGo to next message
Vincent Simonet is currently offline Vincent SimonetFriend
Messages: 8
Registered: March 2013
Junior Member
Thanks for your answer.
Re: Content-assist grammar has warnings while the main one has no [message #1225579 is a reply to message #1225578] Mon, 30 December 2013 07:35 Go to previous messageGo to next message
Vincent Simonet is currently offline Vincent SimonetFriend
Messages: 8
Registered: March 2013
Junior Member
Thanks for your answer. Here are some pointers to the code:

Grammar: https:||github.com|vtst|ow|blob|master|src|eclipse|net.vtst.ow.eclipse.less|src|net|vtst|ow|eclipse|less|Less.xtext

Workflow: https:||github.com|vtst|ow|blob|master|src|eclipse|net.vtst.ow.eclipse.less|src|net|vtst|ow|eclipse|less|GenerateLess.mwe2
(normally pretty standard, no backtracking)

(I'm sorry, I had to replace / by | in URLs, because Eclipse forums do not allow to post links when you have fewer than 5 messages...)
Re: Content-assist grammar has warnings while the main one has no [message #1225611 is a reply to message #1225579] Mon, 30 December 2013 09:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13661
Registered: July 2009
Senior Member
Hi,

your grammar looks very complicated (huge usage of terminal/fragments - maybe datatype rules would be better)
never the less this is very time consuming for antlr so you may have to set/increase a timeout
by adding the following to both parser/antlr fragments

options = auto-inject {}
				antlrParam = "-Xconversiontimeout" antlrParam = "30000"


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 30 December 2013 09:38]

Report message to a moderator

Re: Content-assist grammar has warnings while the main one has no [message #1227866 is a reply to message #1225611] Sun, 05 January 2014 21:32 Go to previous message
Vincent Simonet is currently offline Vincent SimonetFriend
Messages: 8
Registered: March 2013
Junior Member
Christian Dietrich wrote on Mon, 30 December 2013 04:38


your grammar looks very complicated (huge usage of terminal/fragments - maybe datatype rules would be better)


Yes, I agree it is complicated, but I'm unsure about how to simplify it. One of the main difficulties with that language is that whitespaces have to be considered in parsing.

Quote:

never the less this is very time consuming for antlr so you may have to set/increase a timeout
by adding the following to both parser/antlr fragments

options = auto-inject {}
				antlrParam = "-Xconversiontimeout" antlrParam = "30000"


Indeed, it solved the problem. Thanks a lot. I think I can imagine what Xconversiontimeout means. Can you explain what auto-inject {} does?
Previous Topic:Xcore - Using annotations in IDE
Next Topic:Cross references not getting resolved on Clean Build
Goto Forum:
  


Current Time: Sun Nov 29 23:35:35 GMT 2020

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

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

Back to the top