1. 4
  1. 2

    This is from Marpa’s creator, so it’s going to be biased. :) However one thing I find interesting is that PEG and I never really clicked, while other ‘less-rigorous’ approaches like combinators, recursive descent, and Pratt parsers didn’t bother me at all. I can’t really explain why that’d be the case. Perhaps it was the fact I never found a compelling niche for PEG.

    1. 1

      Agree with the bias bit but the references and examples I thought were interesting. I wouldn’t have guessed that the simple grammar A -> aAa / aa specified the language with powers of 2 ‘a’ letters instead of mulptiples of 2. So the criticism about understanding PEGs seems to be valid but I don’t think it’s a very strong criticism. I doubt most people could reason about Java’s grammar.

      1. 1

        That really surprises me. I’ve implemented a PEG-based parsing framework and I see most of those as basically the same idea: pick a standard return-value convention for your recursive descent parser and you get parser combinators, write a DSL to describe a tree of combinator calls and you get PEGs.