Aamer Akhter <[EMAIL PROTECTED]> writes:
> We're starting a project that includes a parser that would convert a
> huge swath of multi-device output (output of explicit commands) to an
> XML tokenized form.
> ...
> I've written parse::recdescent grammars for some of this output in
> the past but speed was the biggest issue. Has anybody done speed
> comparisons between Perl6::Rules and prd?

I haven't done a benchmark -- I'd expect P6::R to be faster, I don't
know by how much.  Still, if you're parsing huge amounts of output:

* Is the data's grammar context-free or regular?  If the latter, you
  might want to consider building a regular parser (e.g. Perl's regex
  engine).

* Are the context-free parts fairly small?  If so, then segmenting the
  input into these sections before parsing might be a good idea.

* How familiar are you with Lex and Yacc?  These are old-school tools
  that are very stable and efficient.

In any case, I'd be wary of P6::R since, as the docs imply, it
tickles bugs in the perl regex engine if you try to do anything too
complicated.

/s

Reply via email to