whoCreated: chouser whenCreated: 2006-04-25 14:11:22 mimetype: text/plain
download   paste more
/* This is test input for the comment contest scripts
* This file has the word "wacky" in several different
* contexts, so you can try that as you comment term.

#include "wacky.h"  // don't comment either of these wacky's

/* wacky */ main() {
 comment this /* wacky */ /* not this wacky */ but this /* wacky *//* again */;
 /* wacky */ in a C++ comment; // wacky
 this is /* wacky */esque;
 /* here is a multi-line comment with
  * wacky thrown in the middle

 And finally some string constants "wacky" should remain uncommented;
 Also "a wacky in the middle" should remain uncommented;
 But a /* wacky */ "near something" that is a string should be a /* wacky */ commented;

#if 0
 vim syntax hilighting knows this is a comment, but I guess it is
   okay if the script comments /* wacky */ anyway.;

 Here is a bit of // tricky /* comment mixing
   this /* wacky */ should get commented
   // since the opening star-slash was itself commented */

 Similarly, /* nested comments /* don't really work */ so this /* wacky */
 should get commented as well;

 We also need to handle "strings with \"escaped quotes. wacky
   \"should" not be commented;  Neither "should \"wacky".  But /* wacky */ should.

 And of course we should deal with "/* comments in wacky strings */";
 Either way, "these // wacky words should remain uncommented";
 Oh, "except // for " this /* wacky */;