in reply to question when learning P::RD?

Hi xiaoyafeng,

I am not sure you really need a parser for such a simple format. Simple regexes on individual lines should probably do the work.

I haven't been using the Parse::RecDescent recently, so this may have no consequence, but maybe you could try to remove the spaces before the colons (":" characters) in your rule definitions.

Replies are listed 'Best First'.
Re^2: question when learning P::RD?
by xiaoyafeng (Deacon) on Aug 28, 2016 at 12:30 UTC
    Laurent_R, Thanks for your reply, the format of original file is not as simple as I showed. it's about 10M size and various types nest in it.(like ^M xxxx, ^D xxxx etc). besides, it's a good chance to learn knowledge of parsing language to me. I want to have a try. ;)




    I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction