Incremental Compilation in Recursive‑Descent Parser (Roslyn)
langdev.stackexchange.com·11h·
Discuss: Hacker News
Flag this post

First off, as with my answer to your previous question, I last worked on this code in 2012 so my memory is likely faulty. I’ll make a best effort though.


We called the incremental parse tree rebuilding algorithm “the blender” because it blends together a new parse with the old one, but also because it makes my brain feel like it’s in a blender whenever I try to figure out how it works. This algorithm was based on Neal Gafter’s PhD research, so it’s a good thing we had Neal on the team at the time. :)

The first thing to note is that the parse tree we hand out via the Roslyn API when you ask for one is NOT the parse tree generated by the parser/blender. It’s a thin wrapper over that parse tree. We called these “red/green trees” because those were the colors of the whiteboard ma…

Similar Posts

Loading similar posts...