Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Some time back I had to do something similar. While I am not able to pull example code at the moment, what I did was basically the following:
I then processed the array of entries using the ( number of leading spaces / GCF ) value to determine indentation level. For the example configuration you show, the indentation would show as the following:
Because I was potentially looking at multiple indentation levels, I believe I did something like the following to get the common indentation width:
This resulted in a common indentation factor of 2, which agrees with the observed. Hope that helps. In reply to Re: Parsing by indentation
by atcroft
|
|