#!/usr/bin/gawk -f

BEGIN { section=""; OFS=":";}

/^\[/ {
    section = gensub("\\[([^\\]]+)\\]","\\1","");
    print "[start]",section;
    next;
}

/^[[:space:]]*[[:alnum:]]/ {
    print section,$0;
    next;
}

{
    print "[other]",$0
}
