Commit 8bf50c8a authored by Nibaldo González's avatar Nibaldo González Committed by Christoph Cullmann

Syntax Page: add generated PHP syntax

parent 683788c0
......@@ -11,6 +11,7 @@ Kate's highlighting powered by [KSyntaxHighlighting](https://api.kde.org/framewo
### 3D
* [G-Code](/syntax/data/syntax/gcode.xml)
* [GLSL](/syntax/data/syntax/glsl.xml)
* [OpenSCAD](/syntax/data/syntax/openscad.xml)
* [PLY](/syntax/data/syntax/ply.xml)
* [POV-Ray](/syntax/data/syntax/povray.xml)
* [RenderMan RIB](/syntax/data/syntax/rib.xml)
......@@ -163,7 +164,6 @@ Kate's highlighting powered by [KSyntaxHighlighting](https://api.kde.org/framewo
* [Meson](/syntax/data/syntax/meson.xml)
* [Music Publisher](/syntax/data/syntax/mup.xml)
* [Ninja](/syntax/data/syntax/ninja.xml)
* [OpenSCAD](/syntax/data/syntax/openscad.xml)
* [PGN](/syntax/data/syntax/pgn.xml)
* [QMake](/syntax/data/syntax/qmake.xml)
* [RPM Spec](/syntax/data/syntax/rpmspec.xml)
......@@ -334,3 +334,9 @@ Kate's highlighting powered by [KSyntaxHighlighting](https://api.kde.org/framewo
* [nesC](/syntax/data/syntax/nesc.xml)
* [noweb](/syntax/data/syntax/noweb.xml)
* [xHarbour](/syntax/data/syntax/xharbour.xml)
### Hidden Languages
* [Alerts](/syntax/data/syntax/alert.xml)
* [GCCExtensions](/syntax/data/syntax/gcc.xml)
* [Modelines](/syntax/data/syntax/modelines.xml)
* [PHP/PHP](/syntax/data/syntax/php.xml)
......@@ -5,9 +5,12 @@
<!ENTITY hex_int "(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f]+)*)">
<!ENTITY exp_float "(?:[eE][+-]?&int;)">
<!ENTITY exp_hexfloat "(?:[pP][-+]?&int;)">
<!ENTITY ispphash "(?:#|&#37;\:|\?\?=)">
<!ENTITY pphash "&ispphash;\s*">
]>
<language name="C" section="Sources"
version="6" kateversion="5.0"
version="7" kateversion="5.0"
indenter="cstyle"
extensions="*.c;*.C;*.h"
mimetype="text/x-csrc;text/x-c++src;text/x-chdr"
......@@ -116,8 +119,8 @@
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
<DetectSpaces />
<RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0\s*$" beginRegion="PP" firstNonSpace="true" />
<DetectChar context="AfterHash" char="#" firstNonSpace="true" lookAhead="true" />
<RegExpr attribute="Preprocessor" context="Outscoped" String="&pphash;if\s+0\s*$" beginRegion="PP" firstNonSpace="true" />
<RegExpr context="AfterHash" String="&ispphash;" firstNonSpace="true" lookAhead="true" />
<StringDetect attribute="Region Marker" context="Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
<StringDetect attribute="Region Marker" context="Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
<keyword attribute="Control Flow" context="#stay" String="controlflow"/>
......@@ -126,6 +129,8 @@
<DetectIdentifier />
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
<Detect2Chars attribute="Symbol" context="#stay" char="&lt;" char1="%" beginRegion="Brace1" /> <!-- Digraph: { -->
<Detect2Chars attribute="Symbol" context="#stay" char="%" char1="&gt;" endRegion="Brace1" /> <!-- Digraph: } -->
<!-- Match numbers -->
<RegExpr attribute="Decimal" context="Number" String="\.?[0-9]" lookAhead="true" />
......@@ -158,19 +163,19 @@
</context>
<context attribute="Error" lineEndContext="#pop" name="AfterHash">
<RegExpr attribute="Preprocessor" context="Include" String="#\s*(?:include|include_next)" insensitive="true" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Include" String="&pphash;(?:include|include_next)" insensitive="true" firstNonSpace="true" />
<!-- define, elif, else, endif, error, if, ifdef, ifndef, line, pragma, undef, warning -->
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*if(?:def|ndef)?(?=\s+\S)" insensitive="true" beginRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*endif" insensitive="true" endRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Define" String="#\s*define.*((?=\\))" insensitive="true" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;if(?:def|ndef)?(?=\s+\S)" insensitive="true" beginRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;endif" insensitive="true" endRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Define" String="&pphash;define.*((?=\\))" insensitive="true" firstNonSpace="true" />
<!-- folding for apple style #pragma mark - label -->
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*pragma\s+mark\s+-\s*$" insensitive="true" firstNonSpace="true" endRegion="pragma_mark" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*pragma\s+mark" insensitive="true" firstNonSpace="true" endRegion="pragma_mark" beginRegion="pragma_mark" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;pragma\s+mark\s+-\s*$" insensitive="true" firstNonSpace="true" endRegion="pragma_mark" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;pragma\s+mark" insensitive="true" firstNonSpace="true" endRegion="pragma_mark" beginRegion="pragma_mark" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*(?:el(?:se|if)|define|undef|line|error|warning|pragma)" insensitive="true" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s+[0-9]+" insensitive="true" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;(?:el(?:se|if)|define|undef|line|error|warning|pragma)" insensitive="true" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="Preprocessor" String="&ispphash;\s+[0-9]+" insensitive="true" firstNonSpace="true" />
</context>
<context attribute="Preprocessor" lineEndContext="#pop" name="Include">
......@@ -203,9 +208,9 @@
<IncludeRules context="##Doxygen" />
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
<RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="#pop" String="#\s*el(?:se|if)" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="#pop" String="&pphash;el(?:se|if)" firstNonSpace="true" />
<RegExpr attribute="Preprocessor" context="#pop" String="&pphash;endif" endRegion="PP" firstNonSpace="true" />
</context>
<context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
......@@ -216,8 +221,8 @@
<IncludeRules context="##Doxygen" />
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
<RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Comment" context="#pop" String="&pphash;endif" endRegion="PP" firstNonSpace="true" />
</context>
<context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
......
......@@ -5,15 +5,18 @@
<!ENTITY name "(?![0-9])[\w_:][\w.:_-]*">
<!ENTITY entref "&amp;(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
]>
<language name="GNU Gettext" version="6" kateversion="5.0" section="Markup" extensions="*.po;*.pot" mimetype="text/x-gettext-translation" author="Dominik Haumann (dhaumann@kde.org)" license="MIT">
<language name="GNU Gettext" version="7" kateversion="5.0" section="Markup" extensions="*.po;*.pot" mimetype="text/x-gettext-translation" author="Dominik Haumann (dhaumann@kde.org)" license="MIT">
<highlighting>
<list name="keywords">
<item>msgid</item>
<item>msgid_plural</item>
<item>msgstr</item>
<item>msgctxt</item>
</list>
<list name="translate">
<item>msgstr</item>
</list>
<list name="fuzzy">
<item>fuzzy</item>
</list>
......@@ -22,6 +25,7 @@
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces/>
<keyword String="keywords" attribute="Keyword" context="#stay" firstNonSpace="true"/>
<keyword String="translate" attribute="Keyword" context="Msgstr" firstNonSpace="true"/>
<Detect2Chars char="#" char1="." attribute="Automatic Comment" context="AutomaticComment" firstNonSpace="true"/>
<Detect2Chars char="#" char1=":" attribute="Reference" context="References" firstNonSpace="true"/>
<Detect2Chars char="#" char1="," attribute="Flag" context="Flags" firstNonSpace="true"/>
......@@ -29,7 +33,15 @@
<Detect2Chars char="#" char1=" " attribute="Translator Comment" context="TranslatorComment" firstNonSpace="true"/>
<DetectChar char="#" attribute="Extension Comment" context="ExtensionComment" firstNonSpace="true"/>
<DetectChar char="&quot;" attribute="String" context="String"/>
<RangeDetect char="[" char1="]" attribute="Index" context="#stay"/>
</context>
<context name="Msgstr" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="MsgstrString">
<RangeDetect char="[" char1="]" attribute="Index" context="MsgstrString"/>
</context>
<context name="MsgstrString" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop">
<DetectSpaces/>
<DetectChar char="&quot;" attribute="Translated String" context="Translated String"/>
</context>
<context name="TranslatorComment" attribute="Translator Comment" lineEndContext="#pop">
......@@ -82,6 +94,17 @@
<RegExpr String="&entref;" attribute="Entity" context="#stay"/>
</context>
<context name="Translated String" attribute="Translated String" lineEndContext="#pop!Error">
<DetectSpaces/>
<DetectIdentifier/>
<Detect2Chars char="{" char1="+" attribute="StringDiffNewWrap" context="StringDiffNew"/>
<Detect2Chars char="{" char1="-" attribute="StringDiffOldWrap" context="StringDiffOld"/>
<RegExpr String="&lt;/?[a-zA-Z][-_:0-9a-zA-Z]*>" attribute="StringTag" context="#stay"/>
<DetectChar char="&quot;" attribute="Translated String" context="#pop"/>
<RegExpr String="\\." attribute="Char" context="#stay"/>
<RegExpr String="&entref;" attribute="Entity" context="#stay"/>
</context>
<context name="Error" attribute="Error" lineEndContext="#stay">
<RegExpr String=".+" attribute="Error" context="#pop"/>
</context>
......@@ -155,38 +178,39 @@
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Error" defStyleNum="dsError"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="KeywordPrevious" defStyleNum="dsKeyword" italic="true" color="#006060"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="StringPrevious" defStyleNum="dsString" italic="true" color="#008080"/>
<itemData name="Translator Comment" defStyleNum="dsComment" color="#888888"/>
<itemData name="Extension Comment" defStyleNum="dsExtension"/>
<itemData name="Automatic Comment" defStyleNum="dsComment" color="#0000ff"/>
<itemData name="Reference" defStyleNum="dsComment" color="#0000ff"/>
<itemData name="Flag" defStyleNum="dsComment" color="#0000ff"/>
<itemData name="FlagFuzzy" defStyleNum="dsComment" color="#800080" bold="true"/>
<itemData name="Char" defStyleNum="dsChar" color="#ff00ff"/>
<itemData name="CharPrevious" defStyleNum="dsChar" italic="true" color="#00c040"/>
<itemData name="Entity" defStyleNum="dsString" color="#ff0040" bold="true"/>
<itemData name="EntityPrevious" defStyleNum="dsString" color="#40c080" bold="true" italic="true"/>
<itemData name="StringTag" defStyleNum="dsString" color="#c00000" bold="true"/>
<itemData name="StringTagPrevious" defStyleNum="dsString" color="#006060" bold="true" italic="true"/>
<itemData name="Index" defStyleNum="dsDecVal" color="#0000ff"/>
<itemData name="IndexPrevious" defStyleNum="dsDecVal" italic="true" color="#000000"/>
<itemData name="StringDiffNewWrap" defStyleNum="dsString" color="#0080f8"/>
<itemData name="StringDiffOldWrap" defStyleNum="dsString" color="#f00080"/>
<itemData name="StringDiffNew" defStyleNum="dsString" underline="true" color="#0080f8"/>
<itemData name="StringDiffOld" defStyleNum="dsString" underline="true" color="#f00080"/>
<itemData name="StringDiffNewWrapComment" defStyleNum="dsString" italic="true" color="#0080f8"/>
<itemData name="StringDiffOldWrapComment" defStyleNum="dsString" italic="true" color="#f00080"/>
<itemData name="StringDiffNewComment" defStyleNum="dsString" italic="true" color="#0080f8"/>
<itemData name="StringDiffOldComment" defStyleNum="dsString" italic="true" color="#f00080"/>
<itemData name="StringDiffNewWrapPrevious" defStyleNum="dsString" italic="true" color="#0080f8"/>
<itemData name="StringDiffOldWrapPrevious" defStyleNum="dsString" italic="true" color="#f00080"/>
<itemData name="StringDiffNewPrevious" defStyleNum="dsString" italic="true" color="#0080f8"/>
<itemData name="StringDiffOldPrevious" defStyleNum="dsString" italic="true" color="#f00080"/>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
<itemData name="KeywordPrevious" defStyleNum="dsKeyword" italic="true" spellChecking="false"/>
<itemData name="String" defStyleNum="dsString" spellChecking="false"/>
<itemData name="StringPrevious" defStyleNum="dsString" italic="true" spellChecking="false"/>
<itemData name="Translated String" defStyleNum="dsString"/>
<itemData name="Translator Comment" defStyleNum="dsComment"/>
<itemData name="Extension Comment" defStyleNum="dsExtension" spellChecking="false"/>
<itemData name="Automatic Comment" defStyleNum="dsComment" spellChecking="false"/>
<itemData name="Reference" defStyleNum="dsComment" spellChecking="false"/>
<itemData name="Flag" defStyleNum="dsComment" spellChecking="false"/>
<itemData name="FlagFuzzy" defStyleNum="dsComment" bold="true" spellChecking="false"/>
<itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="CharPrevious" defStyleNum="dsChar" italic="true" spellChecking="false"/>
<itemData name="Entity" defStyleNum="dsString" bold="true" spellChecking="false"/>
<itemData name="EntityPrevious" defStyleNum="dsString" bold="true" italic="true" spellChecking="false"/>
<itemData name="StringTag" defStyleNum="dsString" bold="true" spellChecking="false"/>
<itemData name="StringTagPrevious" defStyleNum="dsString" bold="true" italic="true" spellChecking="false"/>
<itemData name="Index" defStyleNum="dsDecVal" spellChecking="false"/>
<itemData name="IndexPrevious" defStyleNum="dsDecVal" italic="true" spellChecking="false"/>
<itemData name="StringDiffNewWrap" defStyleNum="dsString"/>
<itemData name="StringDiffOldWrap" defStyleNum="dsString"/>
<itemData name="StringDiffNew" defStyleNum="dsString" underline="true"/>
<itemData name="StringDiffOld" defStyleNum="dsString" underline="true"/>
<itemData name="StringDiffNewWrapComment" defStyleNum="dsString" italic="true"/>
<itemData name="StringDiffOldWrapComment" defStyleNum="dsString" italic="true"/>
<itemData name="StringDiffNewComment" defStyleNum="dsString" italic="true"/>
<itemData name="StringDiffOldComment" defStyleNum="dsString" italic="true"/>
<itemData name="StringDiffNewWrapPrevious" defStyleNum="dsString" italic="true"/>
<itemData name="StringDiffOldWrapPrevious" defStyleNum="dsString" italic="true"/>
<itemData name="StringDiffNewPrevious" defStyleNum="dsString" italic="true"/>
<itemData name="StringDiffOldPrevious" defStyleNum="dsString" italic="true"/>
</itemDatas>
</highlighting>
<general>
......
......@@ -22,7 +22,7 @@
<language
name="ISO C++"
section="Sources"
version="16"
version="17"
kateversion="5.0"
indenter="cstyle"
style="C++"
......@@ -294,15 +294,15 @@
<!-- Match scope regions -->
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
<Detect2Chars attribute="Symbol" context="#stay" char="&lt;" char1="%" beginRegion="Brace1" /> <!-- Digraph: { -->
<Detect2Chars attribute="Symbol" context="#stay" char="%" char1="&gt;" endRegion="Brace1" /> <!-- Digraph: } -->
<!-- Detect attributes -->
<Detect2Chars attribute="Symbol" context="Attribute" char="[" char1="[" />
<StringDetect attribute="Symbol" context="Attribute" String="&lt;:&lt;:" /> <!-- Digraph: [[ -->
<!-- Match numbers -->
<RegExpr attribute="Decimal" context="Number" String="\.?[0-9]" lookAhead="true" />
<!-- Match comments -->
<IncludeRules context="match comments and region markers" />
<!-- Match punctuators -->
<AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Match keywords -->
<IncludeRules context="match keywords" />
<!-- Match string literals -->
......@@ -320,6 +320,9 @@
<IncludeRules context="match identifier" />
<!-- Match preprocessor directives -->
<RegExpr attribute="Preprocessor" context="AfterHash" String="&ispphash;" lookAhead="true" />
<!-- Match punctuators -->
<AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Match invalid symbols -->
<AnyChar attribute="Error" context="#stay" String="$@`" />
</context>
......@@ -519,6 +522,7 @@
<DetectSpaces/>
<keyword attribute="Standard Attribute" context="#stay" String="attributes" />
<Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" />
<StringDetect attribute="Symbol" context="#pop" String=":&gt;:&gt;" /> <!-- Digraph: ]] -->
<DetectChar attribute="Separator Symbol" context="#stay" char="," />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Attributes may contain some text: [[deprecated("Reason text")]] -->
......@@ -696,6 +700,7 @@
<AnyChar attribute="Symbol" context="#stay" String="{}" />
<!-- Detect attributes -->
<Detect2Chars attribute="Symbol" context="Attribute In PP" char="[" char1="[" />
<StringDetect attribute="Symbol" context="Attribute In PP" String="&lt;:&lt;:" /> <!-- Digraph: [[ -->
<!-- Match numbers -->
<RegExpr attribute="Decimal" context="Number" String="\.?[0-9]" lookAhead="true" />
<!-- Match comments -->
......
......@@ -30,11 +30,11 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
==========================================================================================
Last update: March 07, 2019 (v3)
Last update: August 30, 2019 (v4)
-->
<language name="Logcat"
version="3"
version="4"
kateversion="5.0"
section="Other"
extensions="*.logcat"
......@@ -171,9 +171,6 @@
</contexts>
<itemDatas>
<!-- NOTE: [07-Mar-19, KF5.55.0] The use of underline="0", bold="0" and italic="0"
does not work, therefore, some styles have been changed (see bug: #143399).
Check this when the bug is corrected. -->
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Comment" defStyleNum="dsComment" italic="1" />
<itemData name="DateTime" defStyleNum="dsComment" italic="0" underline="0" spellChecking="false" />
......@@ -182,19 +179,16 @@
<itemData name="Verbose Message" defStyleNum="dsNormal" bold="0" />
<itemData name="Debug Tag" defStyleNum="dsAttribute" bold="1" />
<itemData name="Debug Message" defStyleNum="dsAttribute" bold="0" />
<!-- Info: dsProcessor -->
<itemData name="Info Tag" defStyleNum="dsOthers" bold="1" />
<itemData name="Info Message" defStyleNum="dsOthers" bold="0" />
<itemData name="Info Tag" defStyleNum="dsPreprocessor" bold="1" />
<itemData name="Info Message" defStyleNum="dsPreprocessor" bold="0" />
<itemData name="Warning Tag" defStyleNum="dsInformation" bold="1" />
<itemData name="Warning Message" defStyleNum="dsInformation" bold="0" />
<itemData name="Assert Tag" defStyleNum="dsChar" bold="1" />
<itemData name="Assert Message" defStyleNum="dsChar" bold="0" />
<!-- Silent: dsBuiltIn -->
<itemData name="Silent Tag" defStyleNum="dsAnnotation" bold="1" />
<itemData name="Silent Message" defStyleNum="dsAnnotation" bold="0" />
<!-- Error: dsError -->
<itemData name="Error Tag" defStyleNum="dsWarning" bold="1" underline="0" />
<itemData name="Error Message" defStyleNum="dsWarning" bold="0" underline="0" />
<itemData name="Silent Tag" defStyleNum="dsBuiltIn" bold="1" />
<itemData name="Silent Message" defStyleNum="dsBuiltIn" bold="0" />
<itemData name="Error Tag" defStyleNum="dsError" bold="1" underline="0" />
<itemData name="Error Message" defStyleNum="dsError" bold="0" underline="0" />
<itemData name="Fatal" defStyleNum="dsAlert" bold="1" />
</itemDatas>
......
......@@ -46,20 +46,20 @@
<!-- link in normal text -->
<!ENTITY implicitlink "\b&startlink;[^&quot;&gt;\s`\)]*[^\s!&quot;&apos;`\(\)\*,\.:;&lt;&gt;\?~\]\}\\](?=[[:punct:]]*(?:[\s\)]|$))">
<!-- references: [name], [name][id], [name][id] "title", [name](https://example.com) -->
<!ENTITY refchar "[^\]]">
<!ENTITY refname "[^\s\[\]]&refchar;*">
<!ENTITY refchar "(?:\\.|[^\]\\])">
<!ENTITY refname "(?:\\.|[^\s\[\]\\])&refchar;*">
<!ENTITY reflinkid "\s*(?:&refname;)?">
<!ENTITY reflinkidregex "(?:\s?\[&reflinkid;\]|\([^\(\)]*\))">
<!ENTITY reflinkidregex "(?:\s?\[&reflinkid;\]|\((?:\\.|[^\(\)\\])*\))">
<!ENTITY reflinkregex "\[(?:(?=\s*&refname;\])|\s+(?=\]))">
<!-- target ref.: [id]: https://example.com "Title" -->
<!ENTITY reflinktargetregex '\[\s*(?:&refname;|\s)\]\:\s+(?=\S)'>
<!-- footnote: [^name] -->
<!ENTITY footnoteregex "\[\^&refchar;+\]">
<!-- image: ![title](https://example.com), ![title][id] -->
<!ENTITY startinlineimage "\!\[[^\[\]]*\]\(">
<!ENTITY endinlineimage "[^\(\)]*\)">
<!ENTITY startinlineimage "\!\[(?:\\.|[^\[\]\\])*\]\(">
<!ENTITY endinlineimage "(?:\\.|[^\(\)\\])*\)">
<!ENTITY inlineimageregex "&startinlineimage;(?=&endinlineimage;)">
<!ENTITY refimageregex "\!\[[^\[\]]*\]\[&reflinkid;\]">
<!ENTITY refimageregex "\!\[(?:\\.|[^\[\]\\])*\]\[&reflinkid;\]">
<!-- autolink & email: <https://example.com>, <example@kde.org>, <mailto:example@kde.org> -->
<!ENTITY autolinkregex '&lt;&link;&gt;'>
<!ENTITY email "[\-\.\w]+\@[\-a-z0-9]+(?:\.[\-a-z0-9]+)*\.[a-z]+">
......@@ -88,7 +88,7 @@
<!ENTITY checkbox "\[[ x]\](?=\s)">
]>
<language name="Markdown" version="8" kateversion="5.53" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD">
<language name="Markdown" version="9" kateversion="5.53" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD">
<highlighting>
<contexts>
<!-- Start of the Markdown document: find metadata or code block -->
......@@ -398,9 +398,9 @@
<IncludeRules context="code"/>
<IncludeRules context="##JSON" includeAttrib="true"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="markdown-code">
<context attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="find-code-block" name="markdown-code">
<IncludeRules context="code"/>
<IncludeRules context="Start Document" includeAttrib="true"/>
<IncludeRules context="Normal Text"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="matlab-code">
<IncludeRules context="code"/>
......@@ -522,11 +522,13 @@
<!-- References: [example][id], [example](http://example.com) -->
<context name="find-reflink" attribute="Reference-Link Name" lineEndContext="#pop">
<Detect2Chars attribute="Reference-Link Name" char="\" char1="]"/>
<RegExpr attribute="Reference-Link" context="#pop!find-reflink-id" String="\](?=&reflinkidregex;)"/> <!-- Find id -->
<DetectChar attribute="Reference-Link" context="#pop" char="]"/>
<!-- Image as link or reference -->
<RegExpr attribute="Inline Image" context="inlineimage" String="&startinlineimage;(?=&endinlineimage;&refchar;*\])"/>
<RegExpr attribute="Reference Image" String="&refimageregex;(?=&refchar;*\])"/>
<RegExpr attribute="Reference-Link Name" context="#stay" String="(?:\[(?:\\.|[^\[\]\\])*\](?:\\.|[^\[\]\\])*)+(?=\])" minimal="true"/>
</context>
<context name="find-reflink-id" attribute="Reference-Link" lineEndContext="#pop">
<DetectSpaces />
......@@ -536,17 +538,19 @@
<DetectChar attribute="Reference-Link" context="#pop!reflink-inline-id" char="("/>
</context>
<context name="reflink-inline-id" attribute="Reference-Link" lineEndContext="#pop">
<Detect2Chars attribute="Reference-Link" char="\" char1=")"/>
<DetectChar attribute="Reference-Link" context="#pop" char=")"/>
<RegExpr attribute="Reference-Link: Link" String="\b&startlink;[^&quot;&gt;\s\)]+"/>
<RegExpr attribute="Reference-Link: Link" String="\b&startlink;(?:\\.|[^&quot;&gt;\s\)\\])+"/>
<RegExpr attribute="Reference-Link: Email" String="\b&email;\b"/>
</context>
<context name="reflink-id" attribute="Reference-Link ID" lineEndContext="#pop">
<Detect2Chars attribute="Reference-Link ID" char="\" char1="]"/>
<DetectChar attribute="Reference-Link" context="#pop!reflink-title" char="]"/>
<RegExpr attribute="Reference-Link: Link" String="\b&startlink;[^&quot;&gt;\s\]]+"/>
<RegExpr attribute="Reference-Link: Link" String="\b&startlink;(?:\\.|[^&quot;&gt;\s\]\\])+"/>
</context>
<!-- [an example][id] "title" -->
<context name="reflink-title" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr attribute="Reference-Link" context="#pop" String="\s+&quot;[^&quot;]*&quot;"/>
<RegExpr attribute="Reference-Link" context="#pop" String="\s+&quot;(?:\\.|[^&quot;\\])*&quot;"/>
</context>
<!-- Target Ref.: [foo]: http://example.com/ "Optional Title Here" -->
......@@ -561,15 +565,16 @@
</context>
<context name="reflinktarget-title" attribute="Reference-Link Target" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<DetectSpaces attribute="Reference-Link Target"/>
<RangeDetect attribute="Reference-Link Target" context="#pop" char="&quot;" char1="&quot;"/>
<RangeDetect attribute="Reference-Link Target" context="#pop" char="&apos;" char1="&apos;"/>
<RangeDetect attribute="Reference-Link Target" context="#pop" char="(" char1=")"/>
<RegExpr attribute="Reference-Link Target" context="#pop" String="&quot;(?:\\.|[^&quot;\\])*&quot;"/>
<RegExpr attribute="Reference-Link Target" context="#pop" String="&apos;(?:\\.|[^&apos;\\])*&apos;"/>
<RegExpr attribute="Reference-Link Target" context="#pop" String="\((?:\\.|[^\)\\])*\)"/>
</context>
<!-- Image -->
<context name="inlineimage" attribute="Inline Image" lineEndContext="#pop">
<DetectChar attribute="Inline Image" context="#pop" char=")"/>
<RegExpr attribute="Inline Image: Link" String="\b&startlink;[^&quot;&gt;\s\)]+"/>
<Detect2Chars attribute="Inline Image" char="\" char1=")"/>
<RegExpr attribute="Inline Image: Link" String="\b&startlink;(?:\\.|[^&quot;&gt;\s\)\\])+"/>
</context>
</contexts>
<itemDatas>
......@@ -622,7 +627,7 @@
<itemData name="Reference Image" defStyleNum="dsAlert" italic="false" bold="false"/>
<itemData name="Inline Image: Link" defStyleNum="dsAlert" italic="false" bold="false" underline="true"/>
<itemData name="Metadata Title" defStyleNum="dsAnnotation"/>
<itemData name="Metadata" defStyleNum="dsComment"/>
<itemData name="Metadata" defStyleNum="dsComment" italic="0"/>
<itemData name="Backslash Escape" defStyleNum="dsSpecialChar" spellChecking="false"/>
<itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false"/>
</itemDatas>
......
......@@ -57,7 +57,7 @@
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Matlab" version="2" kateversion="2.2" section="Scientific" extensions="*.m;*.M" mimetype="text/mfile" casesensitive="1">
<language name="Matlab" version="3" kateversion="5.0" section="Scientific" extensions="*.m;*.M" mimetype="text/mfile" casesensitive="1">
<highlighting>
<!-- Reserved keywords in MATLAB -->
......@@ -98,8 +98,10 @@
<RegExpr context="_adjoint" attribute="Operator" String="\.'(?=')" />
<!-- If ' is not the adjoint operator, it starts a string or an unterminated string -->
<RegExpr context="#stay" attribute="String" String="'[^']*(''[^']*)*'(?=[^']|$)" />
<RegExpr context="#stay" attribute="Incomplete String" String="'[^']*(''[^']*)*" />
<RegExpr context="#stay" attribute="CharVector" String="'[^']*(''[^']*)*'(?=[^']|$)" />
<RegExpr context="#stay" attribute="Incomplete CharVector" String="'[^']*(''[^']*)*" />
<RegExpr context="#stay" attribute="String" String="&quot;[^&quot;]*(&quot;&quot;[^&quot;]*)*&quot;(?=[^&quot;]|$)" />
<RegExpr context="#stay" attribute="Incomplete String" String="&quot;[^&quot;]*(&quot;&quot;[^&quot;]*)*" />
<!-- Handling of keywords, comments, system commands, identifiers, numbers and braces -->
<keyword context="#stay" attribute="Keyword" String="KeywordsList" />
......@@ -136,25 +138,18 @@
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="Variable" defStyleNum="dsNormal" />
<itemData name="Operator" defStyleNum="dsNormal"/>
<itemData name="Variable" defStyleNum="dsVariable" />
<itemData name="Operator" defStyleNum="dsOperator"/>
<itemData name="Number" defStyleNum="dsFloat" />
<itemData name="Delimiter" defStyleNum="dsNormal" />
<itemData name="String" defStyleNum="dsString" color="#b20000"/>
<itemData name="System" defStyleNum="dsBaseN" color="#b28c00"/>
<itemData name="Incomplete String" defStyleNum="dsChar" color="#a020f0"/>
<itemData name="Keyword" defStyleNum="dsNormal" color="#0000ff"/>
<itemData name="Comment" defStyleNum="dsComment" color="#009900"/>
<itemData name="CharVector" defStyleNum="dsSpecialString" />
<itemData name="String" defStyleNum="dsString" />
<itemData name="System" defStyleNum="dsBaseN" />
<itemData name="Incomplete CharVector" defStyleNum="dsError" />
<itemData name="Incomplete String" defStyleNum="dsError" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="Comment" defStyleNum="dsComment" />
</itemDatas>
<!-- MATLAB 6.5 default color scheme
keywords #0000ff
comments #228b22
strings #b20000
unterminated strings #a020f0
system commands #b28c00
errors #ff0000
all others #000000
-->
</highlighting>
......@@ -166,65 +161,3 @@
</general>
</language>
<!--
%%=====================================================
% MATLAB test code for Kate/Kwrite syntax highlighting
%%=====================================================
% Numbers _____________________________________________
5, 5.5, .1, 0.1, 0.4e5, 1.2e-5, 5i, 5.3i, 6j, .345+3i
5', 5.5', .1', 0.1', 0.4e5', 1.2e-5', 5i', 5.3i', 6j', .345+3i'
% Operators ___________________________________________
% relational operators
'asdf'~=4, c<=4, d>=4, a<b, a>b, a==b, b||c, b&&c
% elementwise arithmetic operators
a.^b, a.*b a./b, 1:4:5
% single-character binary arithmetic
a+3, a-3, a*2, a^3, a/3, a\3, a|b, a&b
% unary operators
a = ~g; g = @sfdgdsf(sdfsd,345); g.' + 1i.' - ('asdf').'
% separators and delimiter
(asd),[sadf];{asdf},;;,;;;()
% continuation
a = 1+ ...
2;
% Strings and adjoint _________________________________
% incomplete strings
'string
'str''
'str''ing
% complete strings
'string' % simple string
'''' % string containing '
'str''ing' % one string containing '
'string' 'string' % two strings
'asdf' 'asdf''' variable % two strings and a variable
'asdf''asdf'' fsgdfg' + (asdf)' - 'asdf'.' + []''''.';''
'sadf'.' % string transpose
% adjoint
{'asdf'}' + 1
('asdf')' + 1
['asdf']' + 1
'' var''' % empty string, var with >1 adjoints
[5]'*{5}'*('asd')'.'+(5)'*6'*asdf'*asdf'.' % many adjoints
A'*B + 1 % adjoint
A.'*B + 1 % transpose
A.'.'*B + 1 % double transpose
A'.' + 1 % adjoint, then transpose
A.'' % transpose, then adjoint
% System command ______________________________________
!hostname
!cp * /tmp
% Reserved keywords ___________________________________
function, persistent, global
switch, case, otherwise
if, else, elseif
try, catch
for, while, break, continue
end, return
function, FUNCTION, Function % case sensitive!
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="OpenSCAD" version="1" kateversion="5.0" section="Other" extensions="*.scad" mimetype="text/x-openscad-src" priority="1" casesensitive="1" author="Julian Stirling (julian@julianstirling.co.uk)" license="MIT">
<language name="OpenSCAD"
version="2"
indenter="cstyle"
kateversion="5.53"
section="3D"
extensions="*.scad"
mimetype="text/x-openscad-src"
priority="1"
casesensitive="1"
author="Julian Stirling (julian@julianstirling.co.uk)"
license="MIT">
<highlighting>
<list name="preprocessor">
<item>include</item>
<item>import</item>
......@@ -18,22 +28,21 @@
<item>module</item>
<item>function</item>
</list>
<list name="2D">
<item>circle</item>
<item>square</item>
<item>polygon</item>
<item>text</item>
</list>
<list name="3D">
<item>sphere</item>
<item>cube</item>
<item>cylinder</item>
<item>polyhedron</item>
</list>
<list name="transformations">
<item>translate</item>
<item>rotate</item>
......@@ -47,13 +56,13 @@
<item>hull</item>
<item>minkowski</item>
</list>
<list name="boolean">
<item>union</item>
<item>difference</item>
<item>intersection</item>
</list>
<list name="mathematical">
<item>abs</item>
<item>sign</item>
......@@ -78,7 +87,7 @@
<item>min</item>
<item>max</item>
</list>
<list name="functions">
<item>concat</item>
<item>lookup</item>
......@@ -91,13 +100,13 @@
<item>cross</item>
<item>parent_module</item>
</list>
<list name="list_comp">
<item>Generate</item>
<item>Conditions</item>
<item>Assignments</item>
</list>
<list name="other">
<item>linear_extrude</item>
<item>rotate_extrude</item>
......@@ -109,7 +118,7 @@
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
<DetectSpaces />
<RegExpr attribute="Error" context="AfterDollar" String="\$[a-zA-Z]*" insensitive="true" firstNonSpace="false" lookAhead="true"/>
<RegExpr attribute="Error" context="AfterDollar" String="\$[a-zA-Z]*" insensitive="true" firstNonSpace="false" lookAhead="true"/>
<keyword attribute="Preprocessor" context="#stay" String="preprocessor"/>
<keyword attribute="Keywords" context="#stay" String="keywords"/>
<keyword attribute="Two Dim" context="#stay" String="2D"/>
......@@ -125,11 +134,11 @@
</context>
<context attribute="Error" lineEndContext="#pop" name="AfterDollar">