.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

158 lines
4.5 KiB

<?xml version="1.0"?>
<!-- syntaxdefinition for PHP 2001 by Chad Smith & Mike Krueger -->
<!-- converted to AvalonEdit format by Siegfried Pammer in 2010 -->
<SyntaxDefinition name ="PHP" extensions = ".php" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="Green" exampleText="// comment" />
<Color name="String" foreground="Blue" exampleText="$text = &quot;Hello, World!&quot;" />
<Color name="NumberLiteral" foreground="DarkBlue" exampleText="3.1415" />
<Color name="Punctuation" foreground="DarkGreen" exampleText="a(b + c)" />
<Color name="FunctionCall" foreground="MidnightBlue" fontWeight="bold" exampleText="abs(num);"/>
<Color name="AccessKeywords" foreground="Black" fontWeight="bold" exampleText="global $database;" />
<Color name="OperatorKeywords" foreground="DarkCyan" fontWeight="bold" exampleText="if (x === false and y === false) { }" />
<Color name="SelectionStatements" foreground="Blue" fontWeight="bold" exampleText="if (true) { } else { }" />
<Color name="IterationStatements" foreground="Blue" fontWeight="bold" exampleText="while (true) { }" />
<Color name="JumpStatements" foreground="Navy" fontWeight="bold" exampleText="if (x == 5) continue;" />
<Color name="ControlStatements" foreground="Teal" fontWeight="bold" exampleText="include(&quot;test.php&quot;);" />
<Color name="ValueTypes" foreground="Red" fontWeight="bold" exampleText="int test = 5;" />
<Color name="OtherTypes" foreground="Red" exampleText="object test = null;" />
<Color name="AccessModifiers" foreground="Blue" fontWeight="bold" exampleText="public function test() {}" />
<RuleSet>
<Span color="Comment">
<Begin>\#</Begin>
</Span>
<Span color="Comment">
<Begin>//</Begin>
</Span>
<Span color="Comment" multiline="true">
<Begin>/\*</Begin>
<End>\*/</End>
</Span>
<!-- Digits -->
<Rule color="NumberLiteral">
\b0[xX][0-9a-fA-F]+ # hex number
|
\b0[0-9]+ # octal number
|
( \b\d+(\.[0-9]+)? #number with optional floating point
| \.[0-9]+ #or just starting with floating point
)
([eE][+-]?[0-9]+)? # optional exponent
</Rule>
<Rule color="Punctuation">
[?,.:;()\[\]{}+\-/%*&lt;&gt;&amp;^!|~@]+
</Rule>
<!-- Mark previous rule-->
<Rule color="FunctionCall">
\b
[\d\w_]+ # an identifier
(?=\s*\() # followed by (
</Rule>
<Span color="String" multiline="true">
<Begin>'</Begin>
<End>'</End>
<RuleSet>
<!-- span for escape sequences -->
<Span begin="\\" end="."/>
</RuleSet>
</Span>
<Span color="String" multiline="true">
<Begin>"</Begin>
<End>"</End>
<RuleSet>
<!-- span for escape sequences -->
<Span begin="\\" end="."/>
</RuleSet>
</Span>
<!-- heredoc syntax -->
<Span color="String" multiline="true">
<Begin>&lt;&lt;&lt;\"?[\d\w_]+\"?$</Begin>
<End>^[\d\w_]+;</End>
</Span>
<!-- nowdoc syntax -->
<Span color="String" multiline="true">
<Begin>&lt;&lt;&lt;\'[\d\w_]+\'$</Begin>
<End>^[\d\w_]+;</End>
</Span>
<Keywords color="AccessKeywords">
<Word>global</Word>
<Word>my</Word>
<Word>var</Word>
</Keywords>
<Keywords color="OperatorKeywords">
<Word>and</Word>
<Word>or</Word>
<Word>new</Word>
<Word>clone</Word>
<Word>instanceof</Word>
<Word>xor</Word>
<Word>true</Word>
<Word>false</Word>
</Keywords>
<Keywords color="SelectionStatements">
<Word>else</Word>
<Word>else</Word>
<Word>switch</Word>
<Word>case</Word>
<Word>endif</Word>
<Word>elseif</Word>
</Keywords>
<Keywords color="IterationStatements">
<Word>do</Word>
<Word>for</Word>
<Word>foreach</Word>
<Word>while</Word>
<Word>endwhile</Word>
<Word>exit</Word>
</Keywords>
<Keywords color="JumpStatements">
<Word>break</Word>
<Word>continue</Word>
<Word>default</Word>
<Word>goto</Word>
<Word>return</Word>
</Keywords>
<Keywords color="ControlStatements">
<Word>require</Word>
<Word>include</Word>
<Word>require</Word>
<Word>include</Word>
<Word>function</Word>
</Keywords>
<Keywords color="ValueTypes">
<Word>int</Word>
<Word>integer</Word>
<Word>real</Word>
<Word>double</Word>
<Word>float</Word>
<Word>string</Word>
<Word>array</Word>
<Word>object</Word>
</Keywords>
<Keywords color="OtherTypes">
<Word>class</Word>
<Word>void</Word>
</Keywords>
<Keywords color="AccessModifiers">
<Word>public</Word>
<Word>private</Word>
</Keywords>
</RuleSet>
</SyntaxDefinition>