| 1 |
lars |
1 |
<?xml version="1.0"?>
|
|
|
2 |
<!-- $Id: php.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
|
|
3 |
|
|
|
4 |
<highlight lang="php">
|
|
|
5 |
|
|
|
6 |
<authors>
|
|
|
7 |
<author name="Andrey Demenev" email ="demenev@gmail.com"/>
|
|
|
8 |
</authors>
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
<default innerClass="code" />
|
|
|
12 |
|
|
|
13 |
<region name="phpCode" delimClass="inlinetags" innerClass="code"
|
|
|
14 |
start="(\<\?(php|=)?)?" end="\?\>" never-contained="yes">
|
|
|
15 |
<contains all="yes"/>
|
|
|
16 |
</region>
|
|
|
17 |
|
|
|
18 |
<region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}" contained="yes">
|
|
|
19 |
<contains all="yes"/>
|
|
|
20 |
</region>
|
|
|
21 |
|
|
|
22 |
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)" contained="yes" >
|
|
|
23 |
<contains all="yes"/>
|
|
|
24 |
</region>
|
|
|
25 |
|
|
|
26 |
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]" contained="yes">
|
|
|
27 |
<contains all="yes"/>
|
|
|
28 |
</region>
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
<region name="mlcomment" innerClass="comment" start="\/\*" end="\*\/" contained="yes">
|
|
|
32 |
<contains block="phpdoc"/>
|
|
|
33 |
<contains block="cvstag"/>
|
|
|
34 |
</region>
|
|
|
35 |
|
|
|
36 |
<region name="strdouble" delimClass="quotes" innerClass="string" start=""" end=""" contained="yes">
|
|
|
37 |
<contains block="var"/>
|
|
|
38 |
</region>
|
|
|
39 |
|
|
|
40 |
<region name="exec" delimClass="quotes" innerClass="string" start="`" end="`" contained="yes">
|
|
|
41 |
<contains block="var"/>
|
|
|
42 |
</region>
|
|
|
43 |
|
|
|
44 |
<region name="heredoc" delimClass="quotes" innerClass="string" start="/\<\<\<[\x20\x09]*(\w+)$/m" end="/^%1%;?$/m" contained="yes" remember="yes">
|
|
|
45 |
<contains block="var"/>
|
|
|
46 |
</region>
|
|
|
47 |
|
|
|
48 |
<region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'" contained="yes"/>
|
|
|
49 |
|
|
|
50 |
<block name="escaped" match="\\\\|\\"|\\'|\\`" innerClass="special" contained="yes">
|
|
|
51 |
<onlyin region="strsingle"/>
|
|
|
52 |
<onlyin region="exec"/>
|
|
|
53 |
</block>
|
|
|
54 |
|
|
|
55 |
<block name="descaped" match="\\[\\"'`tnr\$\{]" innerClass="special" contained="yes">
|
|
|
56 |
<onlyin region="strdouble"/>
|
|
|
57 |
<onlyin region="heredoc"/>
|
|
|
58 |
</block>
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
<region name="comment" start="(#|\/\/)" end="/$|(?=\?\>)/m" innerClass="comment" contained="yes">
|
|
|
62 |
<contains block="cvstag"/>
|
|
|
63 |
</region>
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" contained="yes"/>
|
|
|
67 |
|
|
|
68 |
<block name="typecast" match="\((array|int|integer|string|bool|boolean|object|float|double)\)" innerClass="reserved" contained="yes"/>
|
|
|
69 |
|
|
|
70 |
<block name="curlyvar" match="\{\$[a-z_].*\}" innerClass="var" contained="yes">
|
|
|
71 |
<onlyin region="strdouble"/>
|
|
|
72 |
<onlyin region="heredoc"/>
|
|
|
73 |
<onlyin region="exec"/>
|
|
|
74 |
</block>
|
|
|
75 |
|
|
|
76 |
<region name="codeescape" delimClass="inlinetags" innerClass="default" end="\<\?(php|=)?" start="\?\>" contained="yes">
|
|
|
77 |
<onlyin region="block"/>
|
|
|
78 |
</region>
|
|
|
79 |
|
|
|
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"/>
|
|
|
82 |
|
|
|
83 |
<block name="integer" match="\d\d*|\b0\b" innerClass="number" contained="yes"/>
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
<block name="octinteger" match="0[0-7]+" innerClass="number" contained="yes"/>
|
|
|
87 |
|
|
|
88 |
<block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number" contained="yes"/>
|
|
|
89 |
|
|
|
90 |
<block name="exponent"
|
|
|
91 |
match="((\d+|((\d*\.\d+)|(\d+\.\d*)))[eE][+-]?\d+)"
|
|
|
92 |
innerClass="number" contained="yes"/>
|
|
|
93 |
|
|
|
94 |
<block name="phpdoc" match="\s@\w+\s" innerClass="inlinedoc" contained="yes">
|
|
|
95 |
<onlyin region="mlcomment"/>
|
|
|
96 |
<onlyin region="comment"/>
|
|
|
97 |
</block>
|
|
|
98 |
|
|
|
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"/>
|
|
|
102 |
</block>
|
|
|
103 |
|
|
|
104 |
<block name="email" match="\w+[\.\w\-]+@(\w+[\.\w\-])+" innerClass="url" contained="yes">
|
|
|
105 |
<onlyin region="mlcomment"/>
|
|
|
106 |
<onlyin region="comment"/>
|
|
|
107 |
</block>
|
|
|
108 |
|
|
|
109 |
<block name="note" match="\bnote:" innerClass="inlinedoc" contained="yes">
|
|
|
110 |
<onlyin region="mlcomment"/>
|
|
|
111 |
<onlyin region="comment"/>
|
|
|
112 |
</block>
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
<block name="cvstag" match="\$\w+\s*:.*\$" innerClass="inlinedoc" contained="yes">
|
|
|
116 |
<onlyin region="mlcomment"/>
|
|
|
117 |
<onlyin region="comment"/>
|
|
|
118 |
</block>
|
|
|
119 |
|
|
|
120 |
<keywords name="constants" inherits="identifier" innerClass="reserved" case = "yes">
|
|
|
121 |
<keyword match="DIRECTORY_SEPARATOR"/>
|
|
|
122 |
<keyword match="PATH_SEPARATOR"/>
|
|
|
123 |
</keywords>
|
|
|
124 |
|
|
|
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"/>
|
|
|
192 |
</keywords>
|
|
|
193 |
|
|
|
194 |
</highlight>
|