Incremental Packrat Parsing

Created on 2023-05-11T15:27:28-05:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Packrats remember everything they matched to a matrix; they know that position X successfully matched a given rule with a length.

Quinn: these are thought of as "MxN matrices" though you could probably use a sparse matrix format here.

The paper suggests rather than discarding the memoization: keep it. The table can be strategically patched around the edit site.

Uses the maximum examined space of a rule match as a heuristic.

"ApplyEdit" commits the character insertions/deletions from the user, then removes all parsing spans that overlap with the site.