this is not a 'humpty dumpty' operation it is possible .... but I agree with other responses in that it will be difficult to have perfect 'round tripping'.
btw (note: this is unrelated to your problem, just noticed you might be working with XML) have you considered using XML::Descent
In reply to Re: Reversible parsing (with Parse::RecDescent?)
by cutlass2006
in thread Reversible parsing (with Parse::RecDescent?)
by goibhniu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |