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.
threaded - newest
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.