2 <!-- $Id: php.xml,v 1.1 2007-06-03 02:35:28 ssttoo Exp $ -->
7 <author name="Andrey Demenev" email ="demenev@gmail.com"/>
11 <default innerClass="code" />
13 <region name="phpCode" delimClass="inlinetags" innerClass="code"
14 start="\<\?(php|=)?" end="\?\>" never-contained="yes">
18 <region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}" contained="yes">
22 <region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)" contained="yes" >
26 <region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]" contained="yes">
31 <region name="mlcomment" innerClass="comment" start="\/\*" end="\*\/" contained="yes">
32 <contains block="phpdoc"/>
33 <contains block="cvstag"/>
36 <region name="strdouble" delimClass="quotes" innerClass="string" start=""" end=""" contained="yes">
37 <contains block="var"/>
40 <region name="exec" delimClass="quotes" innerClass="string" start="`" end="`" contained="yes">
41 <contains block="var"/>
44 <region name="heredoc" delimClass="quotes" innerClass="string" start="/\<\<\<[\x20\x09]*(\w+)$/m" end="/^%1%;?$/m" contained="yes" remember="yes">
45 <contains block="var"/>
48 <region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'" contained="yes"/>
50 <block name="escaped" match="\\\\|\\"|\\'|\\`" innerClass="special" contained="yes">
51 <onlyin region="strsingle"/>
52 <onlyin region="exec"/>
55 <block name="descaped" match="\\[\\"'`tnr\$\{]" innerClass="special" contained="yes">
56 <onlyin region="strdouble"/>
57 <onlyin region="heredoc"/>
61 <region name="comment" start="(#|\/\/)" end="/$|(?=\?\>)/m" innerClass="comment" contained="yes">
62 <contains block="cvstag"/>
66 <block name="identifier" match="[a-z_]\w*" innerClass="identifier" contained="yes"/>
68 <block name="typecast" match="\((array|int|integer|string|bool|boolean|object|float|double)\)" innerClass="reserved" contained="yes"/>
70 <block name="curlyvar" match="\{\$[a-z_].*\}" innerClass="var" contained="yes">
71 <onlyin region="strdouble"/>
72 <onlyin region="heredoc"/>
73 <onlyin region="exec"/>
76 <region name="codeescape" delimClass="inlinetags" innerClass="default" end="\<\?(php|=)?" start="\?\>" contained="yes">
77 <onlyin region="block"/>
80 <block name="hexinteger" match="0[xX][\da-f]+" innerClass="number" contained="yes"/>
81 <block name="var" match="\$[a-z_]\w*" innerClass="var" contained="yes"/>
83 <block name="integer" match="\d\d*|\b0\b" innerClass="number" contained="yes"/>
86 <block name="octinteger" match="0[0-7]+" innerClass="number" contained="yes"/>
88 <block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number" contained="yes"/>
90 <block name="exponent"
91 match="((\d+|((\d*\.\d+)|(\d+\.\d*)))[eE][+-]?\d+)"
92 innerClass="number" contained="yes"/>
94 <block name="phpdoc" match="\s@\w+\s" innerClass="inlinedoc" contained="yes">
95 <onlyin region="mlcomment"/>
96 <onlyin region="comment"/>
99 <block name="url" match="((https?|ftp):\/\/[\w\?\.\-\&=\/%+]+)|(^|[\s,!?])www\.\w+\.\w+[\w\?\.\&=\/%+]*" innerClass="url" contained="yes">
100 <onlyin region="mlcomment"/>
101 <onlyin region="comment"/>
104 <block name="email" match="\w+[\.\w\-]+@(\w+[\.\w\-])+" innerClass="url" contained="yes">
105 <onlyin region="mlcomment"/>
106 <onlyin region="comment"/>
109 <block name="note" match="\bnote:" innerClass="inlinedoc" contained="yes">
110 <onlyin region="mlcomment"/>
111 <onlyin region="comment"/>
115 <block name="cvstag" match="\$\w+\s*:.*\$" innerClass="inlinedoc" contained="yes">
116 <onlyin region="mlcomment"/>
117 <onlyin region="comment"/>
120 <keywords name="constants" inherits="identifier" innerClass="reserved" case = "yes">
121 <keyword match="DIRECTORY_SEPARATOR"/>
122 <keyword match="PATH_SEPARATOR"/>
125 <keywords name="reserved" inherits="identifier" innerClass="reserved">
126 <keyword match="echo"/>
127 <keyword match="foreach"/>
128 <keyword match="else"/>
129 <keyword match="if"/>
130 <keyword match="elseif"/>
131 <keyword match="for"/>
132 <keyword match="as"/>
133 <keyword match="while"/>
134 <keyword match="foreach"/>
135 <keyword match="break"/>
136 <keyword match="continue"/>
137 <keyword match="class"/>
138 <keyword match="const"/>
139 <keyword match="declare"/>
140 <keyword match="switch"/>
141 <keyword match="case"/>
142 <keyword match="endfor"/>
143 <keyword match="endswitch"/>
144 <keyword match="endforeach"/>
145 <keyword match="endswitch"/>
146 <keyword match="endif"/>
147 <keyword match="array"/>
148 <keyword match="default"/>
149 <keyword match="do"/>
150 <keyword match="enddeclare"/>
151 <keyword match="eval"/>
152 <keyword match="exit"/>
153 <keyword match="die"/>
154 <keyword match="extends"/>
155 <keyword match="function"/>
156 <keyword match="global"/>
157 <keyword match="include"/>
158 <keyword match="include_once"/>
159 <keyword match="require"/>
160 <keyword match="require_once"/>
161 <keyword match="isset"/>
162 <keyword match="empty"/>
163 <keyword match="list"/>
164 <keyword match="new"/>
165 <keyword match="static"/>
166 <keyword match="unset"/>
167 <keyword match="var"/>
168 <keyword match="return"/>
169 <keyword match="try"/>
170 <keyword match="catch"/>
171 <keyword match="final"/>
172 <keyword match="throw"/>
173 <keyword match="public"/>
174 <keyword match="private"/>
175 <keyword match="protected"/>
176 <keyword match="abstract"/>
177 <keyword match="interface"/>
178 <keyword match="implements"/>
179 <keyword match="const"/>
180 <keyword match="define"/>
181 <keyword match="__FILE__"/>
182 <keyword match="__LINE__"/>
183 <keyword match="__CLASS__"/>
184 <keyword match="__METHOD__"/>
185 <keyword match="__FUNCTION__"/>
186 <keyword match="NULL"/>
187 <keyword match="true"/>
188 <keyword match="false"/>
189 <keyword match="and"/>
190 <keyword match="or"/>
191 <keyword match="xor"/>