php.jsf.in (4587B)
1 # JOE syntax highlight file for PHP 2 # modified by Eric Lin 3 4 # TODO: 5 # * heredoc support (as good as possible) 6 # * highlight function and class names? 7 8 # Define no. sync lines 9 # You can say: 10 # -200 means 200 lines 11 # - means always start parsing from beginning of file when we lose sync 12 # if nothing is specified, the default is -50 13 14 - 15 16 # Define colors 17 18 =Idle 19 =Comment green 20 =Constant cyan 21 =Constant_sq blue 22 =Escape bold cyan 23 =Keyword bold 24 =Var red 25 =Methods bold 26 27 # Call HTML highlighter. It will call the PHP highlighter subroutine in this file. 28 29 :begin Idle 30 * call_failed noeat call=html.html(php) 31 32 :call_failed Var 33 * call_failed 34 35 # PHP highlighter. 36 37 .subr php 38 39 :idle Idle 40 * idle 41 "<" idle_done 42 "?" idle_qmark 43 "%" idle_hash 44 "#" sh_comment recolor=-1 45 "/" slash 46 "0-9" first_digit recolor=-1 47 "'" string_sq recolor=-1 48 "\"" string_dq recolor=-1 49 "\`" string_bq recolor=-1 50 "\i" ident buffer 51 "$" php_var recolor=-1 52 "-" maybe_method 53 "{}" brace recolor=-1 54 55 :idle_done Idle 56 * idle noeat 57 "/" idle noeat recolor=-2 return 58 "<" idle_here 59 60 :idle_here Idle 61 * idle noeat 62 "<" here_doc 63 64 :here_doc Idle 65 * idle noeat 66 " " here_doc 67 "\i" here_name buffer 68 69 :here_name Idle 70 * inhere_doc save_s 71 "\c" here_name 72 73 :inhere_doc Constant 74 * inhere_not_eol 75 "\n" inhere_doc 76 "\i" inhere_name buffer 77 78 :inhere_not_eol Constant 79 * inhere_not_eol 80 "\n" inhere_doc 81 82 :inhere_name Constant 83 * inhere_doc 84 ";" inhere_doc strings 85 "&" idle 86 done 87 "\c" inhere_name 88 89 :brace Methods 90 * idle noeat 91 92 :php_var Var 93 * idle noeat 94 "\c" php_var 95 96 :var_indqstring Var 97 * string_dq recolor=-1 98 "\i" var_indqstring 99 "\"" string_dq noeat 100 "\\" string_dq_esc recolor=-1 101 102 :var_inbqstring Var 103 * string_bq recolor=-1 104 "\i" var_inbqstring 105 "\`" string_sq noeat 106 "\\" string_bq_esc recolor=-1 107 108 :maybe_method Methods 109 * idle recolor=-1 110 "?" idle_qmark 111 "%" idle_hash 112 "#" sh_comment recolor=-1 113 "/" slash 114 "0-9" first_digit recolor=-1 115 "'" string_sq recolor=-1 116 "\"" string_dq recolor=-1 117 "\i" ident buffer 118 "$" php_var recolor=-1 119 "{}" brace recolor=-1 120 ">" method recolor=-2 121 122 :method Methods 123 * idle recolor=-1 124 "\i" method recolor=-1 125 126 :idle_qmark Idle 127 * idle noeat 128 ">" idle recolor=-2 return 129 130 :idle_hash Idle 131 * idle noeat 132 ">" idle recolor=-2 return 133 134 :sh_comment Comment 135 * sh_comment 136 "\n" idle 137 138 :slash Idle 139 * idle noeat 140 "*" comment recolor=-2 141 "/" line_comment recolor=-2 142 143 :comment Comment 144 * comment 145 "*" maybe_end_comment 146 147 :maybe_end_comment Comment 148 * comment 149 "/" idle 150 "*" maybe_end_comment 151 152 :line_comment Comment 153 * line_comment 154 "\n" idle 155 156 157 :string_sq Constant_sq 158 * string_sq 159 "\'" idle 160 "\\" string_sq_esc recolor=-1 161 162 :string_sq_esc Escape 163 * string_sq 164 "\n" string_sq recolor=-2 165 166 :string_dq Constant 167 * string_dq 168 "$" var_indqstring recolor=-1 169 "\"" idle 170 "\\" string_dq_esc recolor=-1 171 172 :string_dq_esc Escape 173 * string_dq 174 "\n" string_dq recolor=-2 175 176 :string_bq Constant 177 * string_bq 178 "$" var_inbqstring recolor=-1 179 "\`" idle 180 "\\" string_bq_esc recolor=-1 181 182 :string_bq_esc Escape 183 * string_bq 184 "\n" string_bq recolor=-2 185 186 :first_digit Constant 187 * idle noeat 188 "xX" hex 189 "." float 190 "0" octal 191 "1-9" first_number 192 193 :octal Constant 194 * idle noeat 195 "0-7" octal 196 197 :hex Constant 198 * idle noeat 199 "0-9A-Fa-f" hex 200 201 :first_number Constant 202 * idle noeat 203 "0-9" first_number 204 "." float 205 206 :maybe_float Constant 207 * idle recolor=-2 noeat 208 "0-9" float recolor=-2 209 210 :float Constant 211 * idle noeat 212 "eE" epart 213 "0-9" float 214 215 :epart Constant 216 * idle noeat 217 "0-9+\-" enum 218 219 :enum Constant 220 * idle noeat 221 "0-9" enum 222 223 :ident Idle 224 * idle noeat strings 225 "addslashes" meth 226 "array" meth 227 "array_keys" meth 228 "count" meth 229 "date" meth 230 "chr" meth 231 "empty" meth 232 "end" meth 233 "header" meth 234 "highlight_file" meth 235 "htmlspecialchars" meth 236 "isset" meth 237 "shuffle" meth 238 "strip_tags" meth 239 "strlen" meth 240 "strpos" meth 241 "strrpos" meth 242 "substr" meth 243 "trim" meth 244 "and" kw 245 "as" kw 246 "break" kw 247 "case" kw 248 "class" kw 249 "continue" kw 250 "declare" kw 251 "default" kw 252 "die" kw 253 "do" kw 254 "echo" kw 255 "else" kw 256 "elseif" kw 257 "eval" kw 258 "exception" kw 259 "exit" kw 260 "extends" kw 261 "for" kw 262 "foreach" kw 263 "function" kw 264 "global" kw 265 "if" kw 266 "include" kw 267 "include_once" kw 268 "list" kw 269 "new" kw 270 "or" kw 271 "print" kw 272 "private" kw 273 "public" kw 274 "require" kw 275 "require_once" kw 276 "return" kw 277 "static" kw 278 "switch" kw 279 "unset" kw 280 "while" kw 281 done 282 "\c" ident 283 284 :kw Keyword 285 * idle noeat 286 287 :meth Methods 288 * idle noeat 289 290 :var Var 291 * mark noeat 292 293 .end