Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-25 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found