# HG changeset patch # User haftmann # Date 1118914732 -7200 # Node ID 04cc6b4b3439ee03b7a1aea3fafbe42edbe3ce38 # Parent d1a436d92d3176aeadcd5669e0cde9701a66196f isa-migrate ++ diff -r d1a436d92d31 -r 04cc6b4b3439 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");