1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/usr/bin/perl
# We will invoke this script to remove consecutive @Deprecated annotations in
# a generated source file, see Debian bug #1011814.
use strict;
use warnings;
open FILE, "<", "target/generated-sources/javacc/com/github/javaparser/SimpleCharStream.java"
or die "Cannot open SimpleCharStream.java: $!",
my $lines = '';
$lines = join '', <FILE>;
close FILE;
$lines =~ s|\@Deprecated$(\s*/\*\*)|$1|gm;
open OUTFILE, ">", "target/generated-sources/javacc/com/github/javaparser/SimpleCharStream.java"
or die "Cannot open SimpleCharStream.java: $!";
printf OUTFILE "%s", $lines;
close OUTFILE;
|