3 # Simple little Perl script that takes the cxx-sections.data file as
4 # input and generates a directory structure that mimics the standard's
8 $current_indent_level = -4;
9 while ($line = <STDIN
>) {
11 $next_indent_level = length($MATCH);
12 if ($line =~ /\[([^\]]*)\]/) {
14 while ($next_indent_level < $current_indent_level) {
16 $current_indent_level -= 4;
19 if ($next_indent_level == $current_indent_level) {
22 $current_indent_level = $next_indent_level;