Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » how to enable backtracking
icon5.gif  how to enable backtracking [message #876414] Thu, 24 May 2012 14:47 Go to next message
dav dav is currently offline dav davFriend
Messages: 5
Registered: May 2012
Junior Member
Hi,

How does one enable backtracking in xtext? From what I've researched I uncommented antlr fragment in mwe2 file, that is this:

fragment = parser.antlr.XtextAntlrGeneratorFragment {
options = {
backtrack = true
memoize=true
}
}


However, I still get 'Resolve by left-factoring or using syntactic predicates or using backtrack=true option' errors. Is there something I've overlooked ?

Thanks for any help,
Dav
Re: how to enable backtracking [message #876447 is a reply to message #876414] Thu, 24 May 2012 15:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13669
Registered: July 2009
Senior Member
Hi maybe The error message comes from the antlr UI fragment

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: how to enable backtracking [message #877284 is a reply to message #876414] Sat, 26 May 2012 10:35 Go to previous messageGo to next message
dav dav is currently offline dav davFriend
Messages: 5
Registered: May 2012
Junior Member
Hi,

Actually yes , it is. Clearly I'm missing something obvious, but I'm still not very skilled with xtext. Can you point me where I can find more info on this, or tell me whats wrong ?

Thanks,
Dav
Re: how to enable backtracking [message #877295 is a reply to message #877284] Sat, 26 May 2012 11:00 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13669
Registered: July 2009
Senior Member
Hi,

you have to enable backtracking there too

fragment = parser.antlr.XtextAntlrUiGeneratorFragment {
            	options = {
            		backtrack = true
            	}
            }


~Christian

P.S: if you grammar is actually left recusive you have to solve the left recursion.


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: Sat, 26 May 2012 11:06]

Report message to a moderator

Previous Topic:problems with AbstractContentAssistProcessorTest
Next Topic:Auto formater XText
Goto Forum:
  


Current Time: Sat Dec 05 01:03:22 GMT 2020

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

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

Back to the top