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: 57
Registered: July 2017
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 Jul 04 07:21:08 GMT 2022

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

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

Back to the top