package xm::grabitemxdoc;
use strict;
use xm::o;
"
will look for all global CDOC-comments that do not belong to any ITEMCDEF.
Mark these as ITEMXDOC, and leave the rest to other scan-modules.
"}
my $in = shift;
print STDERR "[";
$in =~ s{(^|</ITEMCDEF(?:\s[^<>]*)?>(?!<ITEMCDEF[\s>]))
( (?:[^<]|<(?!/?(?:CDOC|ITEMCDEF)[\s>]))*.? )
((?:\ *<CDOC(?:\s[^<>]*)?>
(?:.(?!</?CDOC[\s>]))*.
</CDOC(?:\s[^<>]*)?> \ *\s?)+)
}
{
print STDERR "."; $1.$2."<ITEMXDOC>".$3."</ITEMXDOC>"
}gsex;
while(
$in =~ s{(^|</ITEMXDOC(?:\s[^<>]*)?(?=>))
( (?:[^<]|<(?!/?(?:CDOC|ITEMCDEF|ITEMXDOC)[\s>]))* )
((?:\ *<CDOC(?:\s[^<>]*)?>
(?:.(?!</?CDOC[\s>]))*.
</CDOC(?:\s[^<>]*)?> \ *\s?)+)
}
{
print STDERR "."; $1.$2."<ITEMXDOC>".$3."</ITEMXDOC>"
}gsex
) { };
while(
$in =~ s{(^\s*\S+.*)
(<ITEMXDOC>(?!</ITEMXDOC[\s>]))
((?:.(?!</?ITEMXDOC[\s>]))*.?)
(</ITEMXDOC>)}
{ print STDERR ","; $1.$3 }gmex
) { };
print STDERR "]";
return $in;
}
return xm::o::args_stdin(@_, DESC); }
return DO(xm::o::args_stdin(@_, DESC)); }
1;