In your output, where is the last "data data data data" line coming from? In the input there are 7 such lines, in the output, there are 8!
This is a really nice question and can be very elegantly solved using an array as a stack.
In reply to Re: Section Handling - Nested
by hdb
in thread Section Handling - Nested
by veera
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |