... but if this syntax is based on indentation, then you should keep track of the leading whitespace.
Push a closing delimiter like '}' to a @stack for each step forward, and pop it after each step backwards.
BTW: you asked this already didn't you?
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: Convert Non-standard C struct data to standard C struct
by LanX
in thread Change the data to have the format which is like a C struct.
by dwslovedh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |