~/talk

Fast Incremental PEG Parsing

Talkat SLE 2021 · 2021-10-17..10-18· [compilers-and-language-design]
links:none on file
links:none on file
slides:none on file

Presents an incremental PEG parser implementation called GPeg with a syntax-highlighting library Flare and a prototype editor, claiming typical reparses are logarithmic in input size instead of linear. Key techniques are interval tree memo tables to evict overlaps, lazy shifts to avoid eager updates, and tree memoization for repeated tokens. Experimental runs show sub-5ms reparses on files from tens to hundreds of megabytes and competitive behavior versus existing incremental parsers like tree-sitter.

AI-written summary · about

  1. 0:00Overview
  2. 0:46Parsing Expression Grammars (PEG)
  3. 2:05Parsing Expression Grammars (cont.)
  4. 2:42Incremental Parsing
  5. 4:56Full Parse Example
  6. 6:02Handling an Edit
  7. 6:13Reparse Example
  8. 7:33Incremental Packrat Parsing Summary
  9. 8:05Interval Tree
  10. 8:41Lazy Shifts
  11. 10:12Problem #3: Linear Memoization
  12. 11:02Tree Memoization
  13. 12:09Space Optimizations
  14. 12:41Evaluation: Asymptotic Validation
  15. 13:17Evaluation: Example Text Editor
  16. 13:52Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.