Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Question related to difference between Partial and Full parse from Xtext point of view(Question related to difference between Partial and Full parse from Xtext point of view)
Question related to difference between Partial and Full parse from Xtext point of view [message #1702666] Thu, 23 July 2015 19:18 Go to next message
Eclipse UserFriend
I have question related to the difference between Partial and full parse.

If i have file with more that 15000 line, and this file was parsed.
By changing two or three lines in it, does xtext will parse all the file again or partial parsing will be done, if the answer was that partial parsing will work, how could we get the difference between the two models, i mean the difference between the model before that change and after the change.
in other words, how could we get the nodes in datamodel of xtext which updated?

[Updated on: Thu, 23 July 2015 19:19] by Moderator

Re: Question related to difference between Partial and Full parse from Xtext point of view [message #1703333 is a reply to message #1702666] Thu, 30 July 2015 13:02 Go to previous messageGo to next message
Eclipse UserFriend
Hi Kimi,

there is no API that allows to obtain the exact elements that will be
replaced by a partial parsing run.

Generally Xtext will try to minimize the region that needs to be
reparsed if you type in the editor. Often that's not possible due to
lookahead constraints e.g., but on average there is same potential to
safe a few CPU cycles. OTOH parsing is usually not a bottle-neck as long
as you don't use backtracking or large syntactic predicates.

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: Question related to difference between Partial and Full parse from Xtext point of view [message #1703484 is a reply to message #1703333] Sat, 01 August 2015 00:51 Go to previous messageGo to next message
Eclipse UserFriend
Hi sebastian
I have create testcase contains 5 lines, as shown below
Class x (
Int a ; //line2
Int b; // line 3
Int c; //line 4
)
As you can see "a", "b" and "c" represent leaf nodes in the model of xtext based on my grammer
The issue is that by renaming "int b" to "int bb" another complete model created, and my expectation was small modification in the model generated by xtext
What i mean is that my expectation was to keep the model as its and replace the node which represent "int b" with another node only, but i found another model with another objects created
Re: Question related to difference between Partial and Full parse from Xtext point of view [message #1703962 is a reply to message #1703484] Thu, 06 August 2015 03:58 Go to previous message
Eclipse UserFriend
Another question, do we have a way to get notified with every change in xtext datamodel,
Previous Topic:getting issues in Mars verison of Eclipse (Xtext)
Next Topic:Enabling backtrack option
Goto Forum:
  


Current Time: Sun Jul 13 08:47:47 EDT 2025

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

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

Back to the top