# Function to cope with multiline comments
# Must be placed in main section of program
sub parse_multilinecomment
{
my $text = shift;
my $mc = new Text::DelimMatch( '\\/\\*', '\\*\\/' );
my ( $p, $m, $r ) = $mc->match( '/*' . $text );
if ($p) {
$text = $p;
}
else {
$text = "";
}
$text .= $r if ($r);
$m =~ s/^\/\*//;
$m =~ s/\*\/$//;
return $text, $m;
}
####
newline: "\n"
multilinecomment:
newline(0..) '/*'
{
($text,$return) = main::parse_multilinecomment($text);
print $return . "\n";
$return = ['xcomment',$return];
}
##
##
/*
A multiple line
/*
with nested
*/
comment
*/