Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I have to second what hv already said, this description
> The overall record is enclosed with brackets and is composed of KEY, VALUE pairs. doesn't fit the demonstrated sample. There are more types like LIST and QUOTED-STRINGS and especially the first "KEY" (?) sys ecm cloud-provider /Common/aws-ec2 is very confusing. You should better provide an SSCCE (update: especially the expected output) > Any advice on the best way to approach it would be greatly appreciated! Regarding recursive structures > the VALUE, which can be simple text or another bracketed sub-record. you might want to have a look at EDITFWIW: I think after tr/-/_/ I could parse this as a non-strict Perl DSL, just by predefining the key-words as subs. But w/o better specification (whats a keyword, what a bareword/string) of the desired outcome, there is no point in attempting it. Cheers Rolf In reply to Re: Parsing bracket formatted file
by LanX
|
|