/*
 * Highlighting rules for the Objective-C++ language of the HighlighterKit
 * framework.
 */
{
  Contexts = (
    {
      Keywords = (
        {
          Pattern = "{";
          ForegroundColor = "0 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "}";
          ForegroundColor = "0 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "\\[";
          ForegroundColor = "0 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "\\]";
          ForegroundColor = "0 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "(";
          ForegroundColor = "0 0.8 0";
          Bold = YES;
        },
        {
          Pattern = ")";
          ForegroundColor = "0 0.8 0";
          Bold = YES;
        },
        {
          Pattern = ";";
          ForegroundColor = "0.8 0 0.5";
          Bold = YES;
        },
        {
          Pattern = "NS[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*";
          ForegroundColor = "0.5 0.5 0.8";
          Bold = YES;
        },
        {
          Pattern = "GS[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*";
          ForegroundColor = "0.5 0.5 0.2";
          Bold = YES;
        },        
        {
          Pattern = "<auto>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<break>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<case>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<char>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<const>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<continue>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<default>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<do>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<double>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<else>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<enum>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<extern>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<float>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<for>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<goto>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<if>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<int>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<long>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<register>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<return>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<short>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<signed>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<sizeof>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<static>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<struct>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<switch>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<typedef>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<union>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<inline>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<unsigned>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<void>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<volatile>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<while>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<asm>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<catch>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<class>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<friend>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<delete>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<inline>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<new>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<operator>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<private>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<protected>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<public>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<this>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<throw>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<template>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<try>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<virtual>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<const>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<const_cast>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<dynamic_cast>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<explicit>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<false>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<mutable>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<namespace>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<reinterpret_cast>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<static_cast>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<true>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<typeid>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<typename>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<using>";
          ForegroundColor = "0.6 0.45 0.75";
        },
        {
          Pattern = "<wchar_t>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<oneway>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<bycopy>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<byref>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<inout>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<out>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<in>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<\\.\\.\\.>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<[nN]il>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<self>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<super>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<id>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<Class>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<YES>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<NO>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<BOOL>";
          ForegroundColor = "0.6 0.45 0.75";
          Bold = YES;
        },
        {
          Pattern = "<NS_DURING>";
          ForegroundColor = "0.6 0.45 0.75";
        },
        {
          Pattern = "<NS_HANDLER>";
          ForegroundColor = "0.6 0.45 0.75";
        },
        {
          Pattern = "<NS_ENDHANDLER>";
          ForegroundColor = "0.6 0.45 0.75";
        },
        {
          Pattern = "<@interface>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@implementation>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@end>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@class>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@selector>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@protocol>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@throw>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@try>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@catch>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@synchronized>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@defs>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@finally>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@private>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@protected>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@public>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        },
        {
          Pattern = "<@encode>";
          ForegroundColor = "0.1 0.8 0";
          Bold = YES;
        }
      );
    },

    /* Objective-C string */
    {
      Beginning = "@\"";
      Ending = "\"";
      ContextSkips = (
        "\\\\\\\\",
        "\\\\\""
      );
      ForegroundColor = "0.3 0.7 0";
      Keywords = (
        {
          Pattern = "\\\\\\\\";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "\\\\[0123456789]{3}";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "\\\\0";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "\\\\\"";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "\\\\[ntfb]";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "%ll[iu]";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "%[0123456789]*\\.?[0123456789]*[%@cdefginosupxX]";
          ForegroundColor = "0 1 0";
          Bold = YES;
        }
      );
    },

    /* string */
    {
      Beginning = "\"";
      Ending = "\"";
      ContextSkips = (
        "\\\\\\\\",
        "\\\\\""
      );
      ForegroundColor = "0 0.7 0";
      Keywords = (
        {
          Pattern = "\\\\\\\\";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "\\\\[0123456789]{3}";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "\\\\0";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "\\\\\"";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "\\\\[ntfb]";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "%ll[iu]";
          ForegroundColor = "0 1 0";
          Bold = YES;
        },
        {
          Pattern = "%[0123456789]*\\.?[0123456789]*l?[%cdefginosupxX]";
          ForegroundColor = "0 1 0";
          Bold = YES;
        }
      );
    },

    /* character constant */
    {
      Beginning = "'"; 
      Ending = "'";
      ContextSkips = (
        "\\\\\\\\",
        "\\\\'"
      );
      ForegroundColor = "0.2 0.2 0.8";
      BackgroundColor = "0.8 0.8 0";
    },

    /* preproc directive */
    {
      Beginning = "^#";
      Ending = "\n";
      ContextSkips = (
        "\\\\\n"
      );
      ForegroundColor = "0.8 0 0";
      Bold = YES;
    },

    /* multi-line comment */
    {
      Beginning = "/\\*";
      Ending = "\\*/";
      ForegroundColor = "0 0.5 0";
      Italic = YES;
      Keywords = (
        {
          Pattern = "<TODO>";
          ForegroundColor = "0.8 0.1 0.1";
          Bold = YES;
        }
      );
    },

    /* inline comment */
    {
      Beginning = "//";
      Ending = "\n";
      ForegroundColor = "0 0.5 0";
      Italic = YES;
      Keywords = (
        {
          Pattern = "<TODO>";
          ForegroundColor = "0.8 0.1 0.1";
          Bold = YES;
        }
      );
    }
  );
}
