<?xml version="1.0"?>
<!--
		Bluefish HTML Editor
		php.bflang2 $Revision: 5205 $
 
		Copyright (C) 2008-2009 Olivier Sessink

		This program is free software; you can redistribute it and/or modify
		it under the terms of the GNU General Public License as published by
		the Free Software Foundation; either version 2 of the License, or
		(at your option) any later version.

		This program is distributed in the hope that it will be useful,
		but WITHOUT ANY WARRANTY; without even the implied warranty of
		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
		GNU General Public License for more details.

		You should have received a copy of the GNU General Public License
		along with this program; if not, write to the Free Software
		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.		
-->
<!DOCTYPE bflang [
	<!ENTITY i18n "dir,lang">
	<!ENTITY univ "class,id,style,title">
	<!ENTITY evnt "onload,onclick,ondblclick,onmousedown,onmouseup,onmouseover,onmousemove,onmouseout,onkeypress,onkeydown,onkeyup">
	<!ENTITY css-selectors SYSTEM "css-selectors.bfinc">
	<!ENTITY css-rules SYSTEM "css-rules.bfinc">
	<!ENTITY all-javascript SYSTEM "all-javascript.bfinc">
	<!ENTITY all-html SYSTEM "all-html.bfinc">
	<!ENTITY all-php SYSTEM "all-php.bfinc">
]>
<bflang name="PHP" table="40618" contexts="116" matches="6680">
<header>
	<mime type="application/x-php"/>
	<option name="load_reference" default="1" description="load reference data"/>
	<option name="load_completion" default="1" description="load completion data"/>
	<option name="load_php_functions" default="1" description="All php functions" />
	<option name="php_short_open_tag" default="0" />
	<option name="autocomplete_tags" default="1" />
	<option name="javascript_window_functions" default="0" description="window object"/>
	<option name="javascript_document_functions" default="0" description="document object" />
	<highlight name="php-block-tag" style="special-value"  />
	<highlight name="string" style="string"   />
	<highlight name="brackets" style="brackets"  />
	<highlight name="php-keyword" style="keyword"  />
	<highlight name="php-value" style="value" />
	<highlight name="php-function" style="function"  />
	<highlight name="php-comment" style="comment"  />
	<highlight name="php-variable" style="variable"  />

	<highlight name="html-tag" style="tag"  />
	<highlight name="html-comment" style="comment"  />
	<highlight name="html-entity" style="value"  />
	<highlight name="html-attribute" style="attribute" />
	<highlight name="html-reference-external-tag" style="special-tag" />
	<highlight name="html-table-tag" style="special-tag2" />
	<highlight name="html-form-tag" style="special-tag3" />
	<highlight name="html-deprecated-tag" style="warning" />
	
	<highlight name="js-keyword" style="keyword"  />
	<highlight name="js-brackets" style="brackets"  />
	<highlight name="js-type" style="type"  />
	<highlight name="js-comment" style="comment"  />
	<highlight name="js-string" style="string"  />
	<highlight name="js-value" style="value"  />
	<highlight name="js-function" style="function"  />
	<highlight name="css-brackets" style="brackets"  />
	<highlight name="css-comment" style="comment" />
	<highlight name="css-html-tag" style="tag"  />
	<highlight name="css-html-classid" style="tag" />
	<highlight name="css-keyword" style="keyword"  />
	<highlight name="css-property" style="special-keyword"  />
	<highlight name="css-string" style="string" />
	<highlight name="css-value" style="value"   />
	<highlight name="css-pseudo-element" style="keyword" />
</header>
<properties>
	<comment id="/**/" type="block" start="/*" end="*/" />
	<comment id="&lt;!----&gt;" type="block" start="&lt;!--" end="--&gt;" />
	<comment id="//" type="line" start="//" />
	<comment id="#" type="line" start="#" />
	<smartindent characters="{" />
	<default_spellcheck enabled="1" />
</properties>
<definition>
<context symbols="&gt;&lt;&amp;; &#9;&#10;&#13;">

&all-html;

<group class="php_short_open_tag">
<element id="&lt;?php" pattern="&lt;(\?|\?php)" is_regex="1" starts_block="1" highlight="php-block-tag">
<context symbols="'&#34;(){}[];#:.,/?!$^*-+=&gt;&lt;&amp; &#9;&#10;&#13;" highlight="region">
&all-php;
<element pattern="//" highlight="php-comment">
	<context id="line-comment" symbols="?&gt;&#10;&#13;" highlight="php-comment">
		<element pattern="[&#10;&#13;]" is_regex="1" ends_context="1" />
		<element pattern="?&gt;" ends_context="2" ends_block="1" blockstartelement="&lt;?php" highlight="php-block-tag" mayfold="1" />
	</context>
</element>
<!-- there is a bug in the scanning engine such that a regex style pattern like (#|//) won't work. The reason is that
there is special code if a pattern ends on a symbol. That code fails on the above pattern because both # and / are ends 
for this pattern and both of them are a symbol. That's why we have a separate entry for # and for // -->
<element pattern="#" highlight="php-comment">
	<context idref="line-comment"/>
</element>
<element pattern="?&gt;" ends_block="1" blockstartelement="&lt;?php" highlight="php-block-tag" mayfold="1" ends_context="1" />
</context></element>
</group>
<group notclass="php_short_open_tag">
<element pattern="&lt;?php" starts_block="1" highlight="php-block-tag">
<context symbols="'&#34;(){}[];#:.,/?!$^*-+=&gt;&lt;&amp; &#9;&#10;&#13;" highlight="region">
<!-- unfortunately we cannot refer the context as previously used, because if option php_short_open_tag 
was disabled, this whole section is not parsed by the language manager, so the context does not yet exist..  -->
&all-php;
<element pattern="//" highlight="php-comment">
	<context id="line-comment" symbols="?&gt;&#10;&#13;" highlight="php-comment">
		<element pattern="[&#10;&#13;]" is_regex="1" ends_context="1" />
		<element pattern="?&gt;" ends_context="2" ends_block="1" blockstartelement="&lt;?php" highlight="php-block-tag" mayfold="1" />
	</context>
</element>
<!-- there is a bug in the scanning engine such that a regex style pattern like (#|//) won't work. The reason is that
there is special code if a pattern ends on a symbol. That code fails on the above pattern because both # and / are ends 
for this pattern and both of them are a symbol. That's why we have a separate entry for # and for // -->
<element pattern="#" highlight="php-comment">
	<context idref="line-comment"/>
</element>
<element pattern="?&gt;" ends_block="1" blockstartelement="&lt;?php" highlight="php-block-tag" mayfold="1" ends_context="1" />
</context></element>
</group>

</context>
</definition>
</bflang>
