next up previous contents index
Next: dict2xh.pl Up: Code Previous: ccsmread.C

ir2classes.pl

#!/usr/local/bin/perl

$baseflag = 0;

while (<>) 
{
    chop;
    /^([^ ]*) *([^ ]*) *([^ ]*) *([^ ]*)/;
    $w1 = $1;
    $w2 = $2;
    $w3 = $3;
    $w4 = $4;
    
#    print"$w1 : $w2 : $w3 : $w4\n";
#    print"$baseflag\n";
    if ( $w3 eq "InterfaceDef")
    {
        /["](\w+)["]/;
        $w4 = $1;
        print" $w4 ";
        $baseflag = 0;
    }
   
    if ($baseflag == 1)
    {
        /::(\w+)/;
        $baseclass = $1;
        print "$baseclass ";
    }

    if (($w3 eq "base"))
    {
        $baseflag = 1;
  #  print"=$baseflag";
    }

    if(($w2 eq "instanceData:") && ($baseflag == 1))
    {
        $baseflag = 0;
        print"\n";
    }

} # while (<>)
 



Copyright Munich Network Management Team