4
php.bflang2 $Revision: 5532 $
6
Copyright (C) 2008-2009 Olivier Sessink
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
<!ENTITY i18n "dir,lang">
24
<!ENTITY univ "class,id,style,title">
25
<!ENTITY evnt "onload,onclick,ondblclick,onmousedown,onmouseup,onmouseover,onmousemove,onmouseout,onkeypress,onkeydown,onkeyup">
26
<!ENTITY css-selectors SYSTEM "css-selectors.bfinc">
27
<!ENTITY css-rules SYSTEM "css-rules.bfinc">
28
<!ENTITY all-javascript SYSTEM "all-javascript.bfinc">
29
<!ENTITY all-html SYSTEM "all-html.bfinc">
30
<!ENTITY all-php SYSTEM "all-php.bfinc">
32
<bflang name="PHP" version="2.0" table="44916" contexts="141" matches="7615">
34
<mime type="application/x-php"/>
35
<option name="load_reference" default="1" description="load reference data"/>
36
<option name="load_completion" default="1" description="load completion data"/>
37
<option name="load_php_functions" default="1" description="All php functions" />
38
<option name="php_short_open_tag" default="0" />
39
<option name="autocomplete_tags" default="1" />
40
<option name="javascript_anchors_object" default="1" description="Anchors object" />
41
<option name="javascript_applets_object" default="1" description="Applet object" />
42
<option name="javascript_date_object" default="1" description="Date object" />
43
<option name="javascript_document_object" default="1" description="Document object" />
44
<option name="javascript_event_object" default="1" description="Event object" />
45
<option name="javascript_history_object" default="1" description="History object" />
46
<option name="javascript_location_object" default="1" description="Location object" />
47
<option name="javascript_math_object" default="1" description="Math object" />
48
<option name="javascript_navigator_object" default="1" description="Navigator object" />
49
<option name="javascript_node_object" default="1" description="Node object" />
50
<option name="javascript_screen_object" default="1" description="Screen object" />
51
<option name="javascript_string_object" default="1" description="String object" />
52
<option name="javascript_window_object" default="1" description="Window object" />
53
<option name="sql-in-php-string" default="1" description="scan for sql in php strings" />
54
<highlight name="php-block-tag" style="special-value" />
55
<highlight name="string" style="string" />
56
<highlight name="brackets" style="brackets" />
57
<highlight name="php-keyword" style="keyword" />
58
<highlight name="php-value" style="value" />
59
<highlight name="php-function" style="function" />
60
<highlight name="php-comment" style="comment" />
61
<highlight name="php-variable" style="variable" />
62
<highlight name="php-string-sql-keyword" style="special-keyword" />
64
<highlight name="html-tag" style="tag" />
65
<highlight name="html-comment" style="comment" />
66
<highlight name="html-entity" style="value" />
67
<highlight name="html-attribute" style="attribute" />
68
<highlight name="html-reference-external-tag" style="special-tag" />
69
<highlight name="html-table-tag" style="special-tag2" />
70
<highlight name="html-form-tag" style="special-tag3" />
71
<highlight name="html-deprecated-tag" style="warning" />
73
<highlight name="js-keyword" style="keyword" />
74
<highlight name="js-brackets" style="brackets" />
75
<highlight name="js-type" style="type" />
76
<highlight name="js-comment" style="comment" />
77
<highlight name="js-string" style="string" />
78
<highlight name="js-value" style="value" />
79
<highlight name="js-variable" style="variable" />
80
<highlight name="js-function" style="function" />
81
<highlight name="js-property" style="special-function" />
82
<highlight name="css-brackets" style="brackets" />
83
<highlight name="css-comment" style="comment" />
84
<highlight name="css-html-tag" style="tag" />
85
<highlight name="css-html-classid" style="tag" />
86
<highlight name="css-keyword" style="keyword" />
87
<highlight name="css-property" style="special-keyword" />
88
<highlight name="css-string" style="string" />
89
<highlight name="css-value" style="value" />
90
<highlight name="css-pseudo-element" style="keyword" />
93
<comment type="block" start="/*" end="*/" />
94
<comment type="block" start="<!--" end="-->" />
95
<comment type="line" start="//" />
96
<comment type="line" start="#" />
97
<smartindent characters="{" />
98
<default_spellcheck enabled="1" />
101
<context symbols="><&; 	 ">
105
<group class="php_short_open_tag">
106
<element id="e.php.short.open" pattern="<(\?|\?php)" is_regex="1" starts_block="1" highlight="php-block-tag">
107
<context symbols="'"(){}[];#:.,/?!$^*-+=><& 	 ">
109
<element id="e.php.short.lbrace" pattern="{" starts_block="1" mayfold="1" highlight="brackets" />
110
<element pattern="}" ends_block="1" blockstartelement="e.php.short.lbrace" highlight="brackets" />
111
<element id="e.php.short.lbracket" pattern="[" starts_block="1" mayfold="1" highlight="brackets" />
112
<element pattern="]" ends_block="1" blockstartelement="e.php.short.lbracket" highlight="brackets" />
113
<element id="e.php.short.lparen" pattern="(" starts_block="1" mayfold="1" highlight="brackets" />
114
<element pattern=")" ends_block="1" blockstartelement="e.php.short.lparen" highlight="brackets" />
115
<element id="e.php.short.lcomment" pattern="/*" starts_block="1" highlight="php-comment">
116
<context symbols="*/	 " highlight="php-comment">
117
<element pattern="*/" ends_block="1" blockstartelement="e.php.short.lcomment" highlight="php-comment" mayfold="1" ends_context="1" />
120
<element id="e.php.short.variable" pattern="$[a-zA-Z_][a-zA-Z0-9_]*" is_regex="1" case_insens="1" highlight="php-variable"/>
121
<element pattern=""" highlight="string">
122
<context symbols="\"$ 	 ' -<>{}[]" highlight="string">
123
<element pattern="\\." highlight="string" is_regex="1" />
124
<element pattern="\$" highlight="string" />
125
<element idref="e.php.short.variable" />
126
<group class="sql-in-php-string" highlight="php-string-sql-keyword" case_insens="1">
127
<element pattern="SELECT" />
128
<element pattern="FROM" />
129
<element pattern="WHERE" />
130
<element pattern="ON" />
131
<element pattern="AS" />
132
<element pattern="ORDER" />
133
<element pattern="LEFT" />
134
<element pattern="INNER" />
135
<element pattern="JOIN" />
136
<element pattern="UPDATE" />
137
<element pattern="INSERT" />
138
<element pattern="DELETE" />
140
<element pattern=""" highlight="string" ends_context="1" />
143
<element pattern="//" highlight="php-comment">
144
<context id="c.php.short.linecomment" symbols="?> " highlight="php-comment">
145
<!-- dos has \r\n -> we should never end a pattern between these two chars -->
146
<element pattern="( | | )" is_regex="1" ends_context="1" />
147
<element pattern="?>" ends_context="2" ends_block="1" blockstartelement="e.php.short.open" highlight="php-block-tag" mayfold="1" />
150
<!-- there is a bug in the scanning engine such that a regex style pattern like (#|//) won't work. The reason is that
151
there is special code if a pattern ends on a symbol. That code fails on the above pattern because both # and / are ends
152
for this pattern and both of them are a symbol. That's why we have a separate entry for # and for // -->
153
<element pattern="#" highlight="php-comment">
154
<context idref="c.php.short.linecomment"/>
156
<element pattern="?>" ends_block="1" blockstartelement="e.php.short.open" highlight="php-block-tag" mayfold="1" ends_context="1" />
159
<group notclass="php_short_open_tag">
160
<element id="e.php.open" pattern="<?php" starts_block="1" highlight="php-block-tag">
161
<context symbols="'"(){}[];#:.,/?!$^*-+=><& 	 ">
162
<!-- unfortunately we cannot refer the context as previously used, because if option php_short_open_tag
163
was disabled, this whole section is not parsed by the language manager, so the context does not yet exist.. -->
165
<element id="e.php.lbrace" pattern="{" starts_block="1" mayfold="1" highlight="brackets" />
166
<element pattern="}" ends_block="1" blockstartelement="e.php.lbrace" highlight="brackets" />
167
<element id="e.php.lbracket" pattern="[" starts_block="1" mayfold="1" highlight="brackets" />
168
<element pattern="]" ends_block="1" blockstartelement="e.php.lbracket" highlight="brackets" />
169
<element id="e.php.lparen" pattern="(" starts_block="1" mayfold="1" highlight="brackets" />
170
<element pattern=")" ends_block="1" blockstartelement="e.php.lparen" highlight="brackets" />
171
<element id="e.php.lcomment" pattern="/*" starts_block="1" highlight="php-comment">
172
<context symbols="*/	 " highlight="php-comment">
173
<element pattern="*/" ends_block="1" blockstartelement="e.php.lcomment" highlight="php-comment" mayfold="1" ends_context="1" />
176
<element id="e.php.variable" pattern="$[a-zA-Z_][a-zA-Z0-9_]*" is_regex="1" case_insens="1" highlight="php-variable"/>
177
<element pattern=""" highlight="string">
178
<context symbols="\"$ 	 ' -<>{}[]" highlight="string">
179
<element pattern="\\." highlight="string" is_regex="1" />
180
<element pattern="\$" highlight="string" />
181
<element idref="e.php.variable" />
182
<group class="sql-in-php-string" highlight="php-string-sql-keyword" case_insens="1">
183
<element pattern="SELECT" />
184
<element pattern="FROM" />
185
<element pattern="WHERE" />
186
<element pattern="ON" />
187
<element pattern="AS" />
188
<element pattern="ORDER" />
189
<element pattern="LEFT" />
190
<element pattern="INNER" />
191
<element pattern="JOIN" />
192
<element pattern="UPDATE" />
193
<element pattern="INSERT" />
194
<element pattern="DELETE" />
196
<element pattern=""" highlight="string" ends_context="1" />
199
<element pattern="//" highlight="php-comment">
200
<context id="c.php.linecomment" symbols="?> " highlight="php-comment">
201
<element pattern="( | | )" is_regex="1" ends_context="1" />
202
<element pattern="?>" ends_context="2" ends_block="1" blockstartelement="e.php.open" highlight="php-block-tag" mayfold="1" />
205
<!-- there is a bug in the scanning engine such that a regex style pattern like (#|//) won't work. The reason is that
206
there is special code if a pattern ends on a symbol. That code fails on the above pattern because both # and / are ends
207
for this pattern and both of them are a symbol. That's why we have a separate entry for # and for // -->
208
<element pattern="#" highlight="php-comment">
209
<context idref="c.php.linecomment"/>
211
<element pattern="?>" ends_block="1" blockstartelement="e.php.open" highlight="php-block-tag" mayfold="1" ends_context="1" />