Proper Reject Handling in Scannerless Generalised LR Parsing
Master Project
Project description
Scannerless Generalised LR (SGLR) parsers can parse context-free grammars extended with conjunction-with-negation, represented by reject rules. This gives us the expressive power of Boolean Grammars. To handle reject rules correctly, we need to handle rejects in a specific order. The first attempt was to order states that can be reduced during parsing: first reduce non-rejectable states, then rejectable states. However, in specific situations an ordering between rejectable states is required for correct parsing results, for example when encoding intersections with reject rules. The question of how to order rejectable states was left open. Recently I had an idea for how to do the ordering, so it should be possible to finally complete the algorithm, without any post-parsing fixes.
Now the task remains to see if this idea actually works, how we can best implement it, implement one of the post-parse fixes from other work, compare performance improvement, and maybe prove the correctness of the idea.
Further reading
- Ordering Rejectable Stacks in SGLR Parsing (2024) by Smits, Jeff and Pelsmaeker, Daniel A. A. (This is starting point)
- Syntax Definition for Language Prototyping (1997) by Visser, Eelco. Chapter 3 (This introduces SGLR)
- A Modular SGLR Parsing Architecture for Systematic Performance Optimization (2018) by Denkers, Jasper. (Previous MSc thesis on which the current parser implementation is based)
Contacts for the project
- Jeff Smits (TU Delft)
- Jesper Cockx (TU Delft)
Supervisor(s): Jeff Smits, Jesper Cockx
Posted: April 09, 2025