Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » dead loop in parser triggered by content assist(dead loop in parser triggered by content assist)
dead loop in parser triggered by content assist [message #1764759] Fri, 02 June 2017 07:04 Go to next message
paul lu is currently offline paul luFriend
Messages: 43
Registered: April 2013
Member
Hi,

I encountered a dead loop when triggering content assist (Ctrl + Space) at some position in our own DSL code.
ContentAssistContextFactory.handleLastCompleteNodeIsAtEndOfDatatypeNode would call parser.getFollowElements(AbstractInternalContentAssistParser). The parser is generated under the *ide project.

This is a DSL with XBase, this seems to run forever, after I suspend the thread, I see the traces below repeating:

..
internal*Parser.rule_XOtherOperator..
...
internal*Parser.rule_XOr...
internal*Parser.rule_XAnd...
..
internal*Parser.rule_XAnd...

The parser is generated and it's hard to go through it. Do you have any clue about this? Or how can I proceed with the problem?

Thanks
Re: dead loop in parser triggered by content assist [message #1764762 is a reply to message #1764759] Fri, 02 June 2017 07:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14735
Registered: July 2009
Senior Member
can you create a bug at https://github.com/eclipse/xtext-extras
with a minimal reproducing grammar and test model



Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: dead loop in parser triggered by content assist [message #1764902 is a reply to message #1764762] Sat, 03 June 2017 08:01 Go to previous message
paul lu is currently offline paul luFriend
Messages: 43
Registered: April 2013
Member
Hi Christian,

I created a bug for this, https://github.com/eclipse/xtext-extras/issues/148

I used a small example to reproduce (press Ctrl+Space at the end of the xbase file).

Test.xtend:

class Test{
def test(Object p1, Object p2){
}
def whenOK((Object)=>void p) {
}
}
test.xbase:

t.test(t, t.whenOK[
t.test(t, t.whenOK[
t.test(t, t.whenOK[
t.test(t, t.whenOK[
t.test(t, t.whenOK[
t.test(t, t.whenOK[
t.test(t, t.whenOK[
t.test(t, t.whenOK[
t.test(t, t.whenOK[

])
])
])
])
])
])
])
])
])

Previous Topic:Internal language parser is not found in xtext project
Next Topic:Referencing to UML elements in Xtext Editor
Goto Forum:
  


Current Time: Tue Dec 03 05:47:45 GMT 2024

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

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

Back to the top