![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Parsing a file with parentheses to build a hashby RichardK (Parson) |
on Nov 13, 2014 at 16:29 UTC ( [id://1107121]=note: print w/replies, xml ) | Need Help?? |
It looks like a simple grammar so I'd use a recursive descent parser, Parse::RecDescent for one. This is just a example off the top of my head and completely untested.
Update Looking at this again, entry shouldn't have those terminal brackets -- it would only parse sections like '(id ((key value))', so just
(I did say this was just off the top of my head !)
In Section
Seekers of Perl Wisdom
|
|