in reply to is Parse::RecDescent good for this job?

Based on your question, it sounds like you're interested in using Parse::RecDescent for the fun and challenge of it (this is why I used the module for a simple log parser some time ago; sorry if I'm looking at your world through my own paradigms inappropriately). It was difficult and tricky to write, but definitely fun and worth it just for the academic challenge. Assuming you're in the same situation...

Do it! It will be fun when it works. There is some jucy info and examples that would help you in "Data Munging with Perl" by Damian Conway, including an awesome step-by-step guide to Parse::RecDescent. I think the trickiest part of Parse::RecDescent--and the part worth really focusing on--is returning a good data structure from your parsing.

If you would be so kind as to post more specific data to parse and some code examples you've worked out, I would be happy to try and help you write a Parse::RecDescent grammar.

Update: Thank you Abigail-II... "Data Munging with Perl" was most definitely written by David Cross. Damian does get credit for the forward of this book, though.

---
"A Jedi uses the Force for knowledge and defense, never for attack."
  • Comment on Re: is Parse::RecDescent good for this job?

Replies are listed 'Best First'.
Re: is Parse::RecDescent good for this job?
by Abigail-II (Bishop) on May 29, 2002 at 09:25 UTC
    There is some jucy info and examples that would help you in "Data Munging with Perl" by Damian Conway
    Just to make sure people don't get the wrong idea, "Data Munging with Perl" was written by David Cross. http://www.manning.com/cross/index.html

    Abigail

Re: Re: is Parse::RecDescent good for this job?
by Anonymous Monk on Sep 11, 2003 at 05:32 UTC
    i've a similar problem: here is the file i want to parse ================ @modname abc = 'A Business Company' @modinfo someinfo here... @modinfo note specialnote-lookup-from-other-file @fields 1 = 1 int 2 = 2-5 string 3 = 6 char @filename path/abc.csv @variable abc 3 text information about the 3rd field ================ As you can see, the file contain many 'sections' and each of them has format that are different. the only thing they have in common is the use of '@' as the section separator. please help Roy

      Please surround code in your post with <code></code> tags.

      ---
      "A Jedi uses the Force for knowledge and defense, never for attack."