Search code examples
language-agnosticparser-generator

Parser Generator for changing file


are there any Parser Generator which generated parsers are capable of the following: Parse a file and if you change line n then it only reparses the line or the lines which changed because of this. So that the parser don't need to reparse the full file.

Greets,

Mathias


Solution

  • Tim Wagner worked on this for quite awhile. See his GLR parsing engine paper. It works basically by keeping the parse tree around and trying to reparse the "entire stream" as a sequence of parse trees and changed tokens. Its quite clever.

    Scott McPeak claims that Elsa implements an incremental GLR parser. AFAIK, Elsa is mostly used for batch parsing.