There was a short paper in Inforum 2010 analyzing the current state of parsers in Perl. See Parser Generation in Perl: an Overview and Available Tools by Hugo Areias et al.

They conclude:

Parser generators in Perl still lacks valuable mechanisms to make them challengeable when compared with other languages, like C. There is no valid support for attribute grammars and, according to the research made, there is only one module on CPAN that supports attribute grammars that, however, lacks of maintenance for several years now.

I have tried myself to improve yacc-like conflict resolution mechanism with a new mechanism called "Postoponed Conflict Resolution" (PPCR). You can see how it is used in several Eyapp examples, See the following files in the t/ directory of the Eyapp distribution:
  1. dynamic.eyp
  2. pascalnestedeyapp3
  3. CplusplusNested2.eyp
The first shows how you can use PPCR to dynamically change the parsing and consequently the abstract syntax trees on the fly.

The second solves the problem of enumerated types versus range types that appears in Extended Pascal. It has been used in the Bison manual to illustrate the power of GLR.

The third one solves the well known C++ ambiguity between certain declarations and statements.

To compile them, install Parse::Eyapp and follow the perldoc instructions in the grammars.

I still believe it is important for the Perl community to cover some important parsing algorithms. There is no currently in CPAN an implementation of GLR, which is important not only when writing translators for DSLs but also in Natural Language Processing


In reply to Re^2: Yacc is dead by casiano
in thread Yacc is dead by casiano

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.