isa-migrate ++
authorhaftmann
Thu, 16 Jun 2005 11:38:52 +0200
changeset 16411 04cc6b4b3439
parent 16410 d1a436d92d31
child 16412 50eab0183aea
isa-migrate ++
Admin/isa-migrate
--- a/Admin/isa-migrate	Thu Jun 16 11:20:52 2005 +0200
+++ b/Admin/isa-migrate	Thu Jun 16 11:38:52 2005 +0200
@@ -38,15 +38,22 @@
                     $thyheader .= "imports";
                     $thyheader .= skip_wscomment() || " ";
                     $diag and print "--->\n(2)>>>$thyheader<<<\n<---\n";
-                    while (m/\G(?!uses|files|begin|:)/cgoms && m!\G\w+!cgoms) {
+                    while (m/\G(?!uses|files|begin|:)/cgoms && m!\G(?:[\w_]+|"[^"]+")!cgoms) {
                         $diag and print "--->\n(3)>>>$&<<<\n<---\n";
                         $thyheader .= $&;
                         $thyheader .= skip_wscomment();
-                        m/\G\+? ?/cgoms;
+                        if (m!\G\+!cgoms) {
+                            m!\G ?!cgoms;
+                        }
                         $thyheader .= skip_wscomment();
+                        #~ if (m/\G(?!uses|files|begin|:)/cgoms) { print '!!!'; }
+                        #~ if (m!\G[\w_]+!cgoms) { print ''; }
                     }
                     $diag and print "--->\n(4)>>>$thyheader<<<\n<---\n";
                 }
+                #~ m!\G.{19}!cgoms;
+                #~ print "***$&\n";
+                #~ die;
                 if (m!\G(?:files|uses)!cgoms) {
                     $thyheader .= "uses";
                     $thyheader .= skip_wscomment();
@@ -58,8 +65,7 @@
                     }
                     $diag and print "--->\n(7)>>>$thyheader<<<\n<---\n";
                 }
-                #~ m!\G.{19}!cgoms;
-                #~ print "***$&\n";
+                
 
                 if (m!\G(?:begin|:)!cgoms) {
                     my $postlude = $';
@@ -86,16 +92,16 @@
     my $commentlevel = 0;
     my @skipped = ();
     while () {
-        if (m!\G\{\*!cgoms) {
+        if (m!\G\(\*!cgoms) {
             push(@skipped, $&);
             $commentlevel++;
         } elsif ($commentlevel > 0) {
-            if (m!\G\*\}!cgoms) {
+            if (m!\G\*\)!cgoms) {
                 push(@skipped, $&);
                 $commentlevel--;
-            } elsif (m!\G(?:
-                        [^{*]|\*[^{}]|\{[^*]
-                       )*!cgomsx) {
+            } elsif (m/\G(?:
+                        \*(?!\))|\((?!\*)|[^(*]
+                       )*/cgomsx) {
                 push(@skipped, $&);
             } else {
                 die ("probably incorrectly nested comment");