Hi Leszek, While I do appreciate the support for PEGs, I feel obligated to point out that appealing to Larry Wall's authority is perhaps not the best way to show that they are very usable in practice.
And I'm not sure what Redziejowski's quote shows with that regard. That being said, PEGs are definitely "safe to use" and "well-defined". I expect the dispute is purely about how "intuitive" the behaviour is. The big difference with CFGs is that the semantics of PEGsis recognition-based (i.e., PEG grammars formalizes a recognizer) instead of generative (CFG grammars can generate by sentences by recursive substitution of non-terminal by their right-hand side). I don't feel like being overly harsh on people who say CFGs are more intutive, because I used to say that PEGs were more intuitive and proceeded to annoy a few people that way. And I understand them! Honestly, after working with both formalism, they're really about identical in terms of difficulty and pitfalls. What *I expect* is that it mostly depends on what one is used to. I dabbled in hand-written recursive-descent parsers, so PEGs felt more intuitive, while people who are used to writing CFGs would probably say they are more intuitive. In any case, it shouldn't be the place of a history to make this subjective judgement, especially when the success of PEG libraries show that it isn't a consensus opinion, nor maybe a majority opinion — I reckon most people are pretty neutral on the whole matter and don't care about parsing quite as much as we weird people do. Cheers, Nicolas LAURENT On Tue, 19 Feb 2019 at 15:08, <[email protected]> wrote: > > If PEGs are not safe to use, because one not always know what language it > is parsing, then why: > > -- Larry Wall went for PEGs in Perl6 > -- why Roman Radziejowski created Mouse parser that is said to: > > http://www.romanredz.se/Mouse/index.htm > > "In view of these facts, it is useful to construct PEG parsers where the > complexity of packrat technology is abandoned in favor of simple and > transparent design. This is the idea of *Mouse*: a parser generator that > transcribes PEG into a set of recursive procedures that closely follow the > grammar. " > > > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "marpa parser" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/marpa-parser/8EEq92TjR4E/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
