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

Parse::RecDescent can easily do this, but it might be overkill. The way you describe the structure doesn't show any recursion, and that's of course one of the main features of Parse::RecDescent.

It will entirely depend on your needs. With Parse::RecDescent, you don't have to bother too much with the actual parsing, all you need to do is write the grammar, and focus on the action.

But you pay a price. Parse::RecDescent isn't very fast. It may be fast enough for your needs, but if it isn't, or you think that learning the grammar of Parse::RecDescent isn't worth the hassle, you can whip up your own parser - with such a trivial structure, that shouldn't be too hard.

So, the answer is, "yes, Parse::RecDescent can certainly do that, but do you really need such a heavy tool?".

Abigail

  • Comment on Re: is Parse::RecDescent good for this job?

Replies are listed 'Best First'.
Re: Re: is Parse::RecDescent good for this job?
by Beatnik (Parson) on May 28, 2002 at 14:24 UTC
    Thanks... I'll cook up a RE then :)
    BTW I attented your introduction to Recursive Descent Parsing talk on YAPC::2.00.1 in Amsterdam (and have the booklet to prove it). It was way over my head back then and I must confess it still is a bit :)

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.