#!/usr/bin/perl

#BookmarkBegin
#BookmarkTitle: Table 54. SysTick register map and reset values
#BookmarkLevel: 4
#BookmarkPageNumber: 250


$print = 0;

while (<>) {
    
    if (/BookmarkBegin/) {
        if ($print) {
            print "$bmk\n";
        }
        $bmk = "";
    }

    $bmk .= $_;


    if (/BookmarkTitle/) {
        ($label, $title) = split (/: /);

        if ($title =~ /^\d/) {
            # print STDERR "t: $title OK\n";
            $print = 1;
        }
        else {
            # print STDERR "DROP: $title\n";
            $print = 0;
        }
    }
}


if ($print) {
    print "$bmk\n";
}
