# JOE syntax highlight file for PHP # TODO: # * heredoc support (as good as possible) # * highlight function and class names? # * asp tag (<%...%>) support # * support # Define no. sync lines # You can say: # -200 means 200 lines # - means always start parsing from beginning of file when we lose sync # if nothing is specified, the default is -50 - # Define colors =HTML green =Mystery red =TransitionPHPshort bold white =TransitionPHPlong bold white =TransitionHTML bold white =TransitionEchoPart1 bold white =TransitionEchoPart2 bold white =ShComment yellow =SlashComment yellow =CComment yellow =Numeric cyan =InvalidNumber red =String1 green =String1Content green =String2 green =String2Content green =String2Var bold green =VarName white =Special cyan =Special2 cyan =Special3 cyan =Background white =ConstName white =Keyword bold white =MagicVar white :html HTML * html "<" html_lt :html_lt HTML * html "?" trans_PHP recolor=-2 :trans_PHP TransitionPHPshort * idle noeat recolor=-1 "p" maybe_php_tag_1 buffer # "*%" special1 recolor=-1 "|&!~" special1 recolor=-1 "();:?" special1 recolor=-1 "[]{}," special2 recolor=-1 "@" special3 recolor=-1 "?" idle_qmark recolor=-1 "#" sh_comment recolor=-1 "/" slash recolor=-1 "0" first_digit_0 recolor=-1 "1-9" first_digit recolor=-1 "." period recolor=-1 "'" string1begin recolor=-1 noeat "\"" string2begin recolor=-1 noeat "a-zA-Z_-" ident recolor=-1 buffer "$" varname recolor=-1 buffer # Delimiters :space Background * idle noeat recolor=-1 :special1 Special * idle noeat recolor=-1 :special2 Special2 * idle noeat recolor=-1 :special3 Special3 * idle noeat recolor=-1 :period String2 * idle noeat recolor=-1 "0-9" float recolor=-2 :slash Special * idle noeat recolor=-1 "*" c_comment recolor=-2 # "/*" "/" slash_comment recolor=-2 # "//" :idle_qmark Special * idle noeat recolor=-1 ">" trans_HTML recolor=-2 # "?>" # Comments :sh_comment ShComment * sh_comment "\n" idle :c_comment CComment * c_comment "*" maybe_end_c_comment :maybe_end_c_comment CComment * c_comment "/" idle "*" maybe_end_c_comment :slash_comment SlashComment * slash_comment "\n" idle # Single quoted string constants :string1begin String1 * string1 :string1end String1 * idle :string1 String1Content * string1 "'" string1end noeat recolor=-1 "\\" string1_escape :string1_escape String1Content * string1 # Double quoted string constants :string2begin String2 * string2 :string2end String2 * idle :string2 String2Content * string2 "\"" string2end noeat recolor=-1 "\\" string2_escape "$" string2_var_begin recolor=-1 "{" string2_var_type2_begin recolor=-1 :string2_escape String2Content * string2 :string2_var_begin String2Var * string2 noeat recolor=-2 "a-zA-Z_-" string2_var "{" string2_var_type2 :string2_var String2Var * string2 noeat recolor=-1 "0-9a-zA-Z_-" string2_var :string2_var_type2 String2Var * string2_var_type2 "\"" string2end noeat recolor=-1 "}" string2 :string2_var_type2_begin String2Var * string2 noeat recolor=-2 "$" string2_var_type2 # Numeric constants :first_digit_0 Numeric * first_digit noeat "xX" hex_first :first_digit Numeric * number_before_e noeat :hex_first Numeric * end_number_suffix noeat recolor=-2 "0-9A-Fa-f" hex :hex Numeric * end_int noeat recolor=-1 "0-9A-Fa-f" hex :number_before_e Numeric * end_int noeat recolor=-1 "0-9" number_before_e "." float "eE" epart :float Numeric * end_float noeat recolor=-1 "eE" epart "0-9" float :epart Numeric * enum_first noeat "-+" enum_first :enum_first Numeric * end_number_suffix noeat recolor=-2 "0-9" enum :enum Numeric * end_float noeat recolor=-1 "0-9" enum :end_float Numeric * end_number_suffix noeat recolor=-1 :end_int Numeric * end_number_suffix noeat recolor=-1 :end_number_suffix InvalidNumber * idle noeat recolor=-1 "a-zA-Z_0-9" end_number_suffix # Keywords :ident ConstName * idle noeat recolor=-1 istrings "and" kw "array" kw "as" kw "break" kw "case" kw "class" kw "continue" kw "declare" kw "default" kw "die" kw "do" kw "echo" kw "else" kw "elseif" kw "empty" kw "enddeclare" kw "endfor" kw "endforeach" kw "endif" kw "endswitch" kw "endwhile" kw "eval" kw "exception" kw "exit" kw "extends" kw "false" kw "for" kw "foreach" kw "function" kw "global" kw "if" kw "include" kw "include_once" kw "isset" kw "list" kw "new" kw "or" kw "print" kw "require" kw "require_once" kw "return" kw "static" kw "switch" kw "true" kw "unset" kw "use" kw "var" kw "while" kw "xor" kw done "a-zA-Z0-9_-" ident :kw Keyword * idle noeat recolor=-1 # Special identifiers :varname VarName * idle noeat recolor=-1 strings "$GLOBALS" superglobal "$_SERVER" superglobal "$_GET" superglobal "$_POST" superglobal "$_COOKIE" superglobal "$_FILES" superglobal "$_ENV" superglobal "$_REQUEST" superglobal "$_SESSION" superglobal done "a-zA-Z0-9_-" varname :superglobal MagicVar * idle noeat recolor=-1