[antlr-interest] Serious doubts on usage of incremental parsing inides

shmuel siegel antlr at shmuelhome.mine.nu
Mon Apr 25 02:45:24 PDT 2005


Ingo Maier wrote:
> Isn't Prashant talking about incremental parsing (as opposed to
> incremental compilation)? I guess incremental parsing with all related
> semantic checking and stuff is way more complex than eclipse/jdt is
> doing incremental compilation. It has no "delta" ASTs/nodes but whole
> delta compilation units as far as I know. When a compilation unit has
> changed, it parses it from beginning to end and builds a whole new AST,
> (not just the lines that changed modifying single nodes). The
> synchronization happens on a level above Prashant's talking and should
> be much simpler to manage. Please correct me if I am wrong. 
Word processors have dealt with this problem for years. They "must" 
layout the visible page at typing speed. The general way to do this is 
to break up the document into smaller objects; determine the first 
object that could have changed; do a foreground layout for anything that 
can change on the screen and a background layout for the rest. As an 
optimization, the layout can terminate anytime an object that is still 
valid has not been affected by the current change (for instance if a 
modified paragraph doesn't change its number of lines, further layout is 
unnecessary).
Parsing code is very similar. It can't do the foreground/background 
split but the other optimizations are very appropriate.


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 4/21/2005



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 4/21/2005



More information about the antlr-interest mailing list