3 # Remove C and C++ comments, by Brian Hiles (brian_hiles@rocketmail.com)
5 # Sped up (and bugfixed to some extent) by Paolo Bonzini (bonzini@gnu.org)
6 # Works its way through the line, copying to hold space the text up to the
7 # first special character (/, ", '). The original version went exactly a
8 # character at a time, hence the greater speed of this one. But the concept
9 # and especially the trick of building the line in hold space are entirely
12 # Taken from http://sed.sourceforge.net/grabbag/scripts/remccoms3.sed
13 # According to http://sed.sourceforge.net/grabbag/ it's in the public domain
15 # 2010-11-06: Remove strings
19 # This line is sufficient to remove C++ comments!
22 # addition for coreboot-lint: For our purpose we don't need strings
99 s,\n\(.[^"'/]*\).*,\1,