isa-migrate ++
authorhaftmann
Thu Jun 16 11:38:52 2005 +0200 (2005-06-16)
changeset 1641104cc6b4b3439
parent 16410 d1a436d92d31
child 16412 50eab0183aea
isa-migrate ++
Admin/isa-migrate
     1.1 --- a/Admin/isa-migrate	Thu Jun 16 11:20:52 2005 +0200
     1.2 +++ b/Admin/isa-migrate	Thu Jun 16 11:38:52 2005 +0200
     1.3 @@ -38,15 +38,22 @@
     1.4                      $thyheader .= "imports";
     1.5                      $thyheader .= skip_wscomment() || " ";
     1.6                      $diag and print "--->\n(2)>>>$thyheader<<<\n<---\n";
     1.7 -                    while (m/\G(?!uses|files|begin|:)/cgoms && m!\G\w+!cgoms) {
     1.8 +                    while (m/\G(?!uses|files|begin|:)/cgoms && m!\G(?:[\w_]+|"[^"]+")!cgoms) {
     1.9                          $diag and print "--->\n(3)>>>$&<<<\n<---\n";
    1.10                          $thyheader .= $&;
    1.11                          $thyheader .= skip_wscomment();
    1.12 -                        m/\G\+? ?/cgoms;
    1.13 +                        if (m!\G\+!cgoms) {
    1.14 +                            m!\G ?!cgoms;
    1.15 +                        }
    1.16                          $thyheader .= skip_wscomment();
    1.17 +                        #~ if (m/\G(?!uses|files|begin|:)/cgoms) { print '!!!'; }
    1.18 +                        #~ if (m!\G[\w_]+!cgoms) { print ''; }
    1.19                      }
    1.20                      $diag and print "--->\n(4)>>>$thyheader<<<\n<---\n";
    1.21                  }
    1.22 +                #~ m!\G.{19}!cgoms;
    1.23 +                #~ print "***$&\n";
    1.24 +                #~ die;
    1.25                  if (m!\G(?:files|uses)!cgoms) {
    1.26                      $thyheader .= "uses";
    1.27                      $thyheader .= skip_wscomment();
    1.28 @@ -58,8 +65,7 @@
    1.29                      }
    1.30                      $diag and print "--->\n(7)>>>$thyheader<<<\n<---\n";
    1.31                  }
    1.32 -                #~ m!\G.{19}!cgoms;
    1.33 -                #~ print "***$&\n";
    1.34 +                
    1.35  
    1.36                  if (m!\G(?:begin|:)!cgoms) {
    1.37                      my $postlude = $';
    1.38 @@ -86,16 +92,16 @@
    1.39      my $commentlevel = 0;
    1.40      my @skipped = ();
    1.41      while () {
    1.42 -        if (m!\G\{\*!cgoms) {
    1.43 +        if (m!\G\(\*!cgoms) {
    1.44              push(@skipped, $&);
    1.45              $commentlevel++;
    1.46          } elsif ($commentlevel > 0) {
    1.47 -            if (m!\G\*\}!cgoms) {
    1.48 +            if (m!\G\*\)!cgoms) {
    1.49                  push(@skipped, $&);
    1.50                  $commentlevel--;
    1.51 -            } elsif (m!\G(?:
    1.52 -                        [^{*]|\*[^{}]|\{[^*]
    1.53 -                       )*!cgomsx) {
    1.54 +            } elsif (m/\G(?:
    1.55 +                        \*(?!\))|\((?!\*)|[^(*]
    1.56 +                       )*/cgomsx) {
    1.57                  push(@skipped, $&);
    1.58              } else {
    1.59                  die ("probably incorrectly nested comment");