00001 <?php
00002 $BEAUT_PATH = realpath(".")."/syntax_highlight/php";
00003 if (!isset ($BEAUT_PATH)) return;
00004 require_once("$BEAUT_PATH/Beautifier/HFile.php");
00005 class HFile_cppsource extends HFile{
00006 function HFile_cppsource(){
00007 $this->HFile();
00008
00009
00010
00011
00012
00013
00014 $this->nocase = "0";
00015 $this->notrim = "0";
00016 $this->perl = "0";
00017
00018
00019
00020 $this->colours = array("blue", "purple", "gray", "brown", "blue");
00021 $this->quotecolour = "blue";
00022 $this->blockcommentcolour = "green";
00023 $this->linecommentcolour = "green";
00024
00025
00026
00027 $this->indent = array("{");
00028 $this->unindent = array("}");
00029
00030
00031
00032 $this->stringchars = array("\"", "'");
00033 $this->delimiters = array("~", "!", "@", "%", "^", "&", "*", "(", ")", "-", "+", "=", "|", "\\", "{", "}", "[", "]", "<", ">", ":", ";", "\"", "'", " ", ",", " ", ".", "?");
00034 $this->escchar = "";
00035
00036
00037
00038 $this->linecommenton = array("//");
00039 $this->blockcommenton = array("/*");
00040 $this->blockcommentoff = array("*/");
00041
00042
00043
00044 $this->keywords = array(
00045 "bool" => "1",
00046 "char" => "1",
00047 "class" => "1",
00048 "const" => "1",
00049 "case" => "1",
00050 "catch" => "1",
00051 "const_cast" => "1",
00052 "double" => "1",
00053 "default" => "1",
00054 "do" => "1",
00055 "delete" => "1",
00056 "dynamic_cast" => "1",
00057 "else" => "1",
00058 "enum" => "1",
00059 "explicit" => "1",
00060 "export" => "1",
00061 "extern" => "1",
00062 "for" => "1",
00063 "false" => "1",
00064 "float" => "1",
00065 "friend" => "1",
00066 "if" => "1",
00067 "inline" => "1",
00068 "int" => "1",
00069 "long" => "1",
00070 "mutable" => "1",
00071 "new" => "1",
00072 "namespace" => "1",
00073 "operator" => "1",
00074 "protected" => "1",
00075 "private" => "1",
00076 "public" => "1",
00077 "reinterpret_cast" => "1",
00078 "return" => "1",
00079 "short" => "1",
00080 "signed" => "1",
00081 "sizeof" => "1",
00082 "static" => "1",
00083 "struct" => "1",
00084 "static_cast" => "1",
00085 "switch" => "1",
00086 "template" => "1",
00087 "throw" => "1",
00088 "true" => "1",
00089 "typedef" => "1",
00090 "typename" => "1",
00091 "this" => "1",
00092 "try" => "1",
00093 "typeid" => "1",
00094 "union" => "1",
00095 "unsigned" => "1",
00096 "using" => "1",
00097 "virtual" => "1",
00098 "void" => "1",
00099 "volatile" => "1",
00100 "wchar_t" => "1",
00101 "while" => "1",
00102 "asm" => "2",
00103 "auto" => "2",
00104 "break" => "2",
00105 "continue" => "2",
00106 "goto" => "2",
00107 "register" => "2",
00108 "#define" => "3",
00109 "#error" => "3",
00110 "#include" => "3",
00111 "#elif" => "3",
00112 "#if" => "3",
00113 "#line" => "3",
00114 "#else" => "3",
00115 "#ifdef" => "3",
00116 "#pragma" => "3",
00117 "#endif" => "3",
00118 "#ifndef" => "3",
00119 "#undef" => "3",
00120 "+" => "4",
00121 "-" => "4",
00122 "=" => "4",
00123 "//" => "4",
00124 "/" => "4",
00125 "%" => "4",
00126 "&" => "4",
00127 ">" => "4",
00128 "<" => "4",
00129 "^" => "4",
00130 "!" => "4",
00131 "|" => "4",
00132 "*" => "4",
00133 "{" => "5",
00134 "}" => "5",
00135 ";" => "5",
00136 "(" => "5",
00137 ")" => "5",
00138 "," => "5");
00139
00140
00141
00142
00143
00144
00145
00146
00147 $this->linkscripts = array(
00148 "1" => "donothing",
00149 "2" => "donothing",
00150 "3" => "donothing",
00151 "4" => "donothing",
00152 "5" => "donothing");
00153 }
00154
00155
00156 function donothing($keywordin)
00157 {
00158 return $keywordin;
00159 }
00160
00161 }?>