144 lines
4.4 KiB
XML
144 lines
4.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- <!DOCTYPE language SYSTEM "language.dtd"> -->
|
|
<language _name="PHP" version="1.0" _section="Scripts" mimetypes="text/x-php;application/x-php;text/x-php-source;application/x-php-source"
|
|
globs="*.php;*.php3;*.php4">
|
|
|
|
<!-- FIXME: keywords before a '(' is hightlined as a function call instead of a keyword -->
|
|
|
|
<escape-char>\</escape-char>
|
|
|
|
<!-- // C++ Line Comment -->
|
|
<line-comment _name = "C++ Line Comment" style= "Comment">
|
|
<start-regex>//</start-regex>
|
|
</line-comment>
|
|
|
|
<!-- # Bourne Shell Line Comment -->
|
|
<line-comment _name = "Bash Line Comment" style= "Comment">
|
|
<start-regex>#</start-regex>
|
|
</line-comment>
|
|
|
|
<!-- /* C Block Comment */ -->
|
|
<block-comment _name = "C Block Comment" style = "Comment">
|
|
<start-regex>/\*</start-regex>
|
|
<end-regex>\*/</end-regex>
|
|
</block-comment>
|
|
|
|
<!-- <? ?> <HTML> inside PHP <? -->
|
|
<pattern-item _name = "First Open PHP Tag" style = "Others">
|
|
<regex><(%|[?](php)?)</regex>
|
|
</pattern-item>
|
|
<block-comment _name = "HTML Block" style = "Others">
|
|
<start-regex>[%?]></start-regex>
|
|
<end-regex><(%|[?](php)?)</end-regex>
|
|
</block-comment>
|
|
|
|
<!-- "duble-quoted strings" -->
|
|
<string _name = "Double Quoted String" style = "String" end-at-line-end = "FALSE">
|
|
<start-regex>"</start-regex>
|
|
<end-regex>"</end-regex>
|
|
</string>
|
|
|
|
<!-- 'single-quoted strings' -->
|
|
<string _name = "Single Quoted String" style = "String" end-at-line-end = "FALSE">
|
|
<start-regex>'</start-regex>
|
|
<end-regex>'</end-regex>
|
|
</string>
|
|
|
|
<!-- `backticks-quoted strings` -->
|
|
<string _name = "Backtick String" style = "String" end-at-line-end = "FALSE">
|
|
<start-regex>`</start-regex>
|
|
<end-regex>`</end-regex>
|
|
</string>
|
|
|
|
<!-- $variable, $$dynamic-variable and even $$$more -->
|
|
<pattern-item _name = "Variable" style = "Data Type">
|
|
<regex>[$]+[a-zA-Z_][a-zA-Z0-9_]*</regex>
|
|
</pattern-item>
|
|
<pattern-item _name = "Array Operators" style ="Data Type">
|
|
<regex>(\[|\])</regex>
|
|
</pattern-item>
|
|
|
|
<!-- function (Call|Definition) ($whatever::$whatelse) even call::objects -->
|
|
<!--
|
|
<pattern-item name = "Open Function" style = "Function">
|
|
<regex>([a-zA-Z0-9_]+::)?[a-zA-Z0-9_]*[ ]*[({]+</regex>
|
|
</pattern-item>
|
|
<pattern-item name = "Close Function" style = "Function">
|
|
<regex>[)}]+</regex>
|
|
</pattern-item>
|
|
-->
|
|
|
|
<!-- This are keywords, the are recognised by php -->
|
|
<keyword-list _name = "Case Sensitive Keyword" style = "Keyword" case-sensitive="TRUE">
|
|
<keyword>abstract</keyword>
|
|
<keyword>and</keyword>
|
|
<keyword>as</keyword>
|
|
<keyword>break</keyword>
|
|
<keyword>case</keyword>
|
|
<keyword>class</keyword>
|
|
<keyword>const</keyword>
|
|
<keyword>continue</keyword>
|
|
<keyword>default</keyword>
|
|
<keyword>die</keyword>
|
|
<keyword>do</keyword>
|
|
<keyword>echo</keyword>
|
|
<keyword>else</keyword>
|
|
<keyword>elseif</keyword>
|
|
<keyword>endfor</keyword>
|
|
<keyword>endforeach</keyword>
|
|
<keyword>endswitch</keyword>
|
|
<keyword>endwhile</keyword>
|
|
<keyword>extends</keyword>
|
|
<keyword>for</keyword>
|
|
<keyword>global</keyword>
|
|
<keyword>function</keyword>
|
|
<keyword>foreach</keyword>
|
|
<keyword>if</keyword>
|
|
<keyword>import</keyword>
|
|
<keyword>include</keyword>
|
|
<keyword>include_once</keyword>
|
|
<keyword>instanceof</keyword>
|
|
<keyword>interface</keyword>
|
|
<keyword>list</keyword>
|
|
<keyword>namespace</keyword>
|
|
<keyword>new</keyword>
|
|
<keyword>or</keyword>
|
|
<keyword>print</keyword>
|
|
<keyword>private</keyword>
|
|
<keyword>protected</keyword>
|
|
<keyword>public</keyword>
|
|
<keyword>require</keyword>
|
|
<keyword>require_once</keyword>
|
|
<keyword>return</keyword>
|
|
<keyword>static</keyword>
|
|
<keyword>switch</keyword>
|
|
<keyword>var</keyword>
|
|
<keyword>while</keyword>
|
|
<keyword>xor</keyword>
|
|
</keyword-list>
|
|
<keyword-list _name = "Case Insensitive Keyword" style = "Keyword" case-sensitive="FALSE">
|
|
<keyword>true</keyword>
|
|
<keyword>false</keyword>
|
|
<keyword>null</keyword>
|
|
</keyword-list>
|
|
<pattern-item _name = "Operators" style = "Keyword">
|
|
<regex>[-.~^@;:/%|\=\+\*\!\?&<>]</regex>
|
|
</pattern-item>
|
|
|
|
<!-- $this = (datatype) -->
|
|
<keyword-list _name= "Data Type" style = "Data Type">
|
|
<keyword>array</keyword>
|
|
<keyword>bool</keyword>
|
|
<keyword>boolean</keyword>
|
|
<keyword>double</keyword>
|
|
<keyword>float</keyword>
|
|
<keyword>int</keyword>
|
|
<keyword>integer</keyword>
|
|
<keyword>object</keyword>
|
|
<keyword>real</keyword>
|
|
<keyword>string</keyword>
|
|
<keyword>unset</keyword>
|
|
</keyword-list>
|
|
|
|
</language>
|