Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I used P:RD about a year ago to parse an intermediate 'language' that was generated by a web. I parsed the language into a datastructure so I could re-represent the clauses the user entered when they went back to edit the block they created. We then took the intermediate language and used lisp to parse and execute the appropriate stuff. It took me a few weeks to get to the point where I was comfortable with it, but overall I don't remember any real pain. (I had never written a true parser before so there was a bunch of learning that I needed to do during that time)

I haven't had the opportunity to use it again but there are a number of other people in my office who have used it to do various tasks. I have been able to support them reasonably well. With only one project using it, I doubt I'd say I attained mastery, but I am confident that I can use it again with little effort if the need should arise.

I am far from scared of going back. I've been wanting another project that needs to use P:RD. I found that I really enjoyed writing the grammar.

One tip I would offer, if speed matters stay away from the lookahead stuff. (In my experience the lookaheads seemed make the parsing crawl. If I were better at language design I could have probabbly avoided the issue alltogether.)


In reply to Re: Gathering experiences with Parse::RecDescent by amw1
in thread Gathering experiences with Parse::RecDescent by leriksen

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 lurking in the Monastery: (4)
As of 2024-04-19 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found