Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: question when learning P::RD?

by Laurent_R (Canon)
on Aug 28, 2016 at 10:03 UTC ( [id://1170613]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1170613]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found