3 ms·
It's very easy to write a PEG that will recognise the a target language, but it will probably recognise a few more as well. They are hard to reason about. LR
by rstuart4133 7y ago
It's very easy to write a PEG that will recognise the a target language, but it will probably recognise a few more as well. They are hard to reason about.
LR and LL have the reverse problem. It's a challenge to get it to recognise a complex target language, but once you get the thing to work at all it's probably right. Also LL & LR are faster (very close to O(size of input)) and use less memory (almost none). PEG's have get their speed by remembering how they reduced what they've seen so far.
There are lots of trade-offs in other words. PEGS win anywhere you would use once of the current crop of NFA based regular expressions recognisers (eg, PCRE), need something better.