The Allegedly Minimal LR(1) (Parsing + check out booze-tools itself) (boozetools.readthedocs.io)
from armchair_progamer@programming.dev to programming_languages@programming.dev on 08 Aug 2023 00:24
https://programming.dev/post/1444946

#programming_languages

threaded - newest

armchair_progamer@programming.dev on 08 Aug 2023 00:34 collapse

If we could somehow perform LR(0) everywhere that it was good enough, and switch to a more powerful method for those parts of the grammar where strictly necessary, then we should see a nice compromise of speed and size while achieving the full recognition power of the stronger method.

In practice, I find hand-rolled parsers are usually the best and easiest to write. Hand-rolleds are also usually LR0 when possible, state and “peeked” tokens are stored in local variables or fields in the Parser class.