in reply to Handling newlines in P::RD

Seeting <skip: ... > is exactly the way to handle this. It stays set through all invoked rules as well.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: Handling newlines in P::RD
by ikegami (Patriarch) on Nov 15, 2004 at 18:23 UTC
    Just to clarify for the OP, "It stays set through all invoked rules as well" means if you place it in your start rule, it'll affect all your rules.
      Thanks, this is the approach I've eventually taken. Still, looking at my grammar and at the attemps I did trying stuff, it's clear that P::RD has an issue with line-oriented input. It's possible, but adds difficulties, mainly because its default "skippable" chars include a newline.

      This can be trivially solved with a tiny bit of preprocessing, but I tried a pure P::RD approach.

      To conclude - it works, it even looks clean enough and not *too* complicated.

      Thanks for the feedback !