package xm::pfe::grab4compiles;
use strict;
use xm::o;
"
will look for all PFE COMPILES-declaration which is a macro to
define a global static structure outside any ITEMCDEF.
Mark these as ITEMCDEF on the outer closure and some inner portions
with XXXXCOMPILES.
"}
my $in = shift;
$in =~ s{ (^|</ITEMCDEF(?:\s[^<>]*)?>)
((?:.(?!</?(?:CDOC|ITEMCDEF)[\s>]))*.?)
((?: \ *<CDOC(?:\s[^<>]*)?(?=>)
(?:.(?!</?CDOC[\s>]))*.
</CDOC(?:\s[^<>]*)?> \ *\s? )*)
(\b(?:P4)?COMPILES\d*)
(\s*\(\s*) (\w+) ((?:\s*,\s*\w+)+) (\s*\)\s*\;\ *\s?)
}
{
print STDERR ":";
$1.$2
."<ITEMCDEF>".$3
."<TYPECOMPILES>".$4."</TYPECOMPILES>".$5
."<NAMECOMPILES>".$6."</NAMECOMPILES>"
."<INFOCOMPILES>".$7."</INFOCOMPILES>".$8
."</ITEMCDEF>"
}gsex;
return $in;
}
return xm::o::args_stdin(@_,DESC); }
return DO(xm::o::args_stdin(@_,DESC)); }
1;