[auton-users] New gcc problems
Shang-Shan Chong
chong2 at andrew.cmu.edu
Mon Jul 22 18:17:27 EDT 2002
On Mon, Jul 22, 2002 at 05:47:37PM -0400, Andrew W. Moore wrote:
> Okay, I am convinced by Dan...we should also disallow // comment chars.
> So my vote is in favor of setting the default to pedantic mode.
>
> Does anyone have the ability to write an ingenious script to automatically
> turn all the current //'s into /* .. */'s?
>
> Andrew
Hi,
I'm normally a silent observer here, but the following perl script
should do the trick, since // are single line comments but /* */'s are
multi-line. It's a code fragment from something I've done before.
#!/usr/bin/perl
while (<>) {
s/\/\/(.*)$/\/\*\1\*\//g;
print;
}
css.
--
Shang-Shan CHONG Dept of Physics, Carnegie Mellon University
office: Wean Hall 8419 tel: (412) 268-4206 email: chongss+ at cmu.edu
More information about the Autonlab-users
mailing list