Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Partial Parsing Problem
Partial Parsing Problem [message #1772704] Thu, 14 September 2017 07:14
mind calm is currently offline mind calmFriend
Messages: 56
Registered: July 2017
Member
Hi,
I want to use incremental parser function in Xtext, as i reading and debuging some codes of Xtext, i found there has a PartialParsingHelper class, which has a function reparse seems to do the incremental parser works.
But as i debuging, i found it always goes into the fullyReparse function.
Finally i found that, if i use parsingPointers.getNodesEnclosingRegion() instead of parsingPointers.getValidReplaceRootNodes(), it will do incremental parser in some scenarios.
List<ICompositeNode> validReplaceRootNodes = parsingPointers.getNodesEnclosingRegion(); //parsingPointers.getValidReplaceRootNodes();

Is this a mistake for useing getValidReplaceRootNodes()?

Another question:
I found if the partial parser result has syntax errors, it will do fully reparser again, may i remove this restriction like blow? Will it brings any negative effects?
 if (newParseResult == null /*|| newParseResult.hasSyntaxErrors()*/) {
	// TODO: Should we reparse if the complete input was parsed?
	// on error fully reparse
	return fullyReparse(parser, previousParseResult, replaceRegion);
}


Best regards!

by Keep Mind Calm
Previous Topic:Add javadoc to @Accessors
Next Topic:Problem with multiple ecore refering
Goto Forum:
  


Current Time: Mon Oct 22 15:20:24 GMT 2018

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

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

Back to the top