Syntax Highlighting for Greater Golf!
Perl 769 chars * 0.9 * 0.8 = 554

Probably still some improvements to be made on some of the regexes, but it's slowly getting there!

$_=join"",&lt;&gt;;$s="&lt;tt class";$c="&lt;/tt&gt;";$d=counter;$e=color;s/\t/    /g;s!&lt;!&amp;lt;!g;s!&gt;!&amp;gt;!g;s!^#.+(?=$|
)!$s=d&gt;$&amp;$c!gm;s!//.+!$s=c&gt;$&amp;$c!g;s|(['"]).*?(?&lt;!\\)(\\\\)*\1|($h=$&amp;)=~s!/!&amp;#47;!g;"$s=s&gt;$h$c"|smeg;s!/\*.*?\*/!$s=c&gt;$&amp;$c!smg;s!\b(_Packed|(au|go)to|break|c(ase|har|onst|ontinue)|d(efault|o|ouble)|e(lse|num|xtern)|f(loat|or)|if|int|long|re(gister|turn)|short|(un)?signed|s(izeof|tatic|truct|witch)|typedef|union|vo(id|latile)|while)\b!$s=r&gt;$&amp;$c!g;s!=(\w)&gt;.+?$c!join"$c
$s=$1&gt;",split$/,$&amp;!smeg;s!
!&lt;tr&gt;&lt;td&gt;!g;print"&lt;style&gt;body{font:10px monospace;$d-reset:n}td{white-space:pre}tr:nth-child(even){background:#c0c0c0}tr:before{$d-increment:n;content:$d(n)}.d{$e:#f0f}.r{$e:#00f}.c{$e:#ff0}.s{$e:#0f0}tt tt{$e:inherit!important}&lt;/style&gt;&lt;table cellspacing=0&gt;&lt;tr&gt;&lt;td&gt;$_"


Slightly less obfuscated version with comments:

$_=join"",&lt;&gt;; # slurp file
$s="&lt;tt class"; # used later - use &lt;tt/&gt; instead of &lt;span/&gt;, fewer chars!
$c="&lt;/tt&gt;";
$d=counter;
$e=color;
s/\t/    /g; # convert tabs to spaces
s!&lt;!&amp;lt;!g; # htmlentity &lt; and &gt;
s!&gt;!&amp;gt;!g;
s!^#.+(?=$|\n)!$s=d&gt;$&amp;$c!gm; # directives
s!//.+!$s=c&gt;$&amp;$c!g; # inline comments
s|(['"]).*?(?&lt;!\\)(\\\\)*\1|($h=$&amp;)=~s!/!&amp;#47;!g;"$s=s&gt;$h$c"|smeg; # strings, might have 0 length - thanks @Einacio; work-around string that contain /* by converting them to HTML entities
s!/\*.*?\*/!$s=c&gt;$&amp;$c!smg; # multi-line comments
s!\b(_Packed|(au|go)to|break|c(ase|har|onst|ontinue)|d(efault|o|ouble)|e(lse|num|xtern)|f(loat|or)|if|int|long|re(gister|turn)|short|(un)?signed|s(izeof|tatic|truct|witch)|typedef|union|vo(id|latile)|while)\b!$s=r&gt;$&amp;$c!g; # reserved words, don't optimise this too much! - thanks @bwoebi
s!=(\w)&gt;.+?$c!join"$c
$s=$1&gt;",split$/,$&amp;!smeg; # any multi-line string/comment, ensure &lt;span/&gt;s are repeated
s!\n!&lt;tr&gt;&lt;td&gt;!g; # strip newlines, replace with &lt;tr&gt;&lt;td&gt;, don't need &lt;/td&gt; _or_ &lt;/tr&gt; - thanks @xfix!
print"&lt;style&gt;
body{font:10px monospace;$d-reset:n} /* init counter */
td{white-space:pre} /* preserve whitespace */
tr:nth-child(odd){background:#c0c0c0} /* alternating rows */
tr:before{$d-increment:n;content:$d(n)} /* place counter */
.d{$e:#f0f} /* highlights */
.r{$e:#00f}
.c{$e:#ff0}
.s{$e:#0f0}
tt tt{$e:inherit!important} /* ignore reserved words/comments in strings */
&lt;/style&gt;&lt;table cellspacing=0&gt;&lt;tr&gt;&lt;td&gt;$_"


Now successfully highlights @xfix's entry.

Borrowed the idea to drop &lt;/tr&gt; from @xfix's entry, thank you!

Example of output for @xfix's solution.