http://www.perlmonks.org?node_id=876198


in reply to Yacc is dead

A note about this sentence: "what you see is what you get if you understand LR(k)" (and also about some Steve Yegge popular writings).

LR parsing is an interesting idea - but it's just a tool. A lot of stuff in programming is stated in a way trying to induce the feeling of 'we understand *** - we are elite, while the unwashed masses still use xxx'. There is nothing wrong with learning new things - but to be honest parsing is not that important in the practice of programming any more. If you need it then it is mostly the case of a widespread language that has already good parsers. If you want to improve those parsers - then yes you need to know the theory - but you can also learn some other theory and improve other libraries or maybe learn something higher level like the stuff that Misko Hevery is blogging about and improve your over-all programming practice.

Replies are listed 'Best First'.
Re^2: Yacc is dead
by casiano (Pilgrim) on Dec 09, 2010 at 10:04 UTC
    If you need it then it is mostly the case of a widespread language that has already good parsers.

    • There are Earley parsers in Perl 5 Parse::Earley and Marpa.
    • There are no GLR parsers in Perl 5, though is one of the most commonly used nowadays (search for GLR and Perl in google)
    • I believe - not really sure - that though there is no explicit Packrat-parsing module, Regexp::Grammars conforms to the Packrat approach
    • As far as I am aware, there is only one CPAN module giving support to attribute grammars: Language::AttributeGrammar
    These are the available choices for the main "Parsing Algorithms" that I know in Perl 5/CPAN. Anything else?
      OK - I agree that writing a parser using these new techniques would be valuable, and you did apparently do a lot of background research and this is all good for the community etc. My note was only a nitpick - don't take it too personally. I only wanted to say that at my work the standard HTML parser (or YAML parser or XML parser or .INI parser) is enough for all I ever needed. Writing a GLR parser or something else would be a great contribution - but so could be solving numerous other problems. My point really is that condescending people for getting things done using whatever available is low and that is what I see in the quoted sentence.
        Should we run to implement the derivative parsers described in the paper in Perl?

        "we" here means myself and the people I work with; which, of course, can include anyone who may be interested.