summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-22 15:05:05 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-22 15:05:05 (GMT)
commit6c19b27f84777671d4ab43d5a17df0bab15707c7 (patch)
tree7ac22e6ccada5f5f7ffb5c589d4b2a66508641bb
parenta2785b6a66aba7d1a75419a04128bf6686292b9b (diff)
sync syntax file changes from master
-rw-r--r--src/syntax/data/c.xml2
-rw-r--r--src/syntax/data/cmake.xml20
-rw-r--r--src/syntax/data/cpp.xml2
-rw-r--r--src/syntax/data/cpp11.xml33
-rw-r--r--src/syntax/data/rest.xml40
5 files changed, 80 insertions, 17 deletions
diff --git a/src/syntax/data/c.xml b/src/syntax/data/c.xml
index d320d27..01566d5 100644
--- a/src/syntax/data/c.xml
+++ b/src/syntax/data/c.xml
@@ -81,6 +81,7 @@
</Float>
<HlCOct attribute="Octal" context="#stay"/>
<HlCHex attribute="Hex" context="#stay"/>
+ <RegExpr attribute="Binary" context="#stay" String="0b[01]+[ul]{0,3}" insensitive="true" />
<Int attribute="Decimal" context="#stay" >
<StringDetect attribute="Decimal" context="#stay" String="ULL" insensitive="TRUE"/>
<StringDetect attribute="Decimal" context="#stay" String="LUL" insensitive="TRUE"/>
@@ -181,6 +182,7 @@
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
+ <itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
<itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="String" defStyleNum="dsString"/>
diff --git a/src/syntax/data/cmake.xml b/src/syntax/data/cmake.xml
index a7dcebc..517d2b8 100644
--- a/src/syntax/data/cmake.xml
+++ b/src/syntax/data/cmake.xml
@@ -5,7 +5,7 @@
Copyright 2004 Alexander Neundorf (neundorf@kde.org)
Copyright 2005 Dominik Haumann (dhdev@gmx.de)
- Copyright 2007,2008 Matthew Woehlke (mw_triad@users.sourceforge.net)
+ Copyright 2007,2008,2013 Matthew Woehlke (mw_triad@users.sourceforge.net)
Copyright 2013 Alex Turbov (i.zaufi@gmail.com)
**********************************************************************
@@ -26,7 +26,7 @@
**********************************************************************
-->
<!-- generated for "cmake version 2.8.11.1" -->
-<language name="CMake" version="1.23" kateversion="2.4" section="Other" extensions="CMakeLists.txt;*.cmake;" mimetype="" author="Alexander Neundorf (neundorf@kde.org)" license="LGPL">
+<language name="CMake" version="1.24" kateversion="2.4" section="Other" extensions="CMakeLists.txt;*.cmake;" mimetype="" author="Alexander Neundorf (neundorf@kde.org)" license="LGPL">
<highlighting>
<!-- ATTENTION Do not change the list name! Or change a generation script accordingly -->
@@ -783,6 +783,7 @@
<item> TARGET_LINKER_DIR </item>
<item> TARGET_SONAME_DIR </item>
<item> TARGET_PROPERTY </item>
+ <item> TARGET_OBJECTS </item>
<item> TARGET_POLICY </item>
<item> AND </item>
<item> OR </item>
@@ -815,6 +816,8 @@
<keyword attribute="Third-Party Commands" context="#stay" String="itkvtk_commands" insensitive="true"/>
<RegExpr attribute="Region Marker" context="#stay" String="#\s*BEGIN.*$" beginRegion="block" firstNonSpace="true"/>
<RegExpr attribute="Region Marker" context="#stay" String="#\s*END.*$" endRegion="block" firstNonSpace="true"/>
+ <RegExpr attribute="Region Marker" context="RST Documentation" String="^#\[(=*)\[\.rst:" column="0" />
+ <RegExpr attribute="Comment" context="Bracketed Comment" String="^#\[(=*)\[" column="0" />
<DetectChar attribute="Comment" context="Comment" char="#"/>
<IncludeRules context="Detect Variables"/>
<RegExpr attribute="Macros" context="Macro Args" String="\w+\s*(?=\()"/>
@@ -900,6 +903,7 @@
<!-- TODO Hmm... this rule looks strange... being in the Normal context -->
<StringDetect attribute="Escapes" context="#stay" String="\&quot;"/>
<DetectChar attribute="Strings" context="String" char="&quot;"/>
+ <RegExpr attribute="Strings" context="Bracketed String" String="\[(=*)\[" />
<DetectChar attribute="Comment" context="Comment" char="#"/>
<IncludeRules context="Detect Builtin Variables"/>
<IncludeRules context="Detect Variables"/>
@@ -909,12 +913,24 @@
<IncludeRules context="##Alerts" />
<IncludeRules context="##Modelines" />
</context>
+ <context attribute="Comment" lineEndContext="#stay" name="RST Documentation" dynamic="true">
+ <RegExpr attribute="Region Marker" context="#pop" String="^#?\]%1\]" dynamic="true" column="0" />
+ <IncludeRules context="##reStructuredText" />
+ </context>
+ <context attribute="Comment" lineEndContext="#stay" name="Bracketed Comment" dynamic="true">
+ <RegExpr attribute="Comment" context="#pop" String="^#?\]%1\]" dynamic="true" column="0" />
+ <IncludeRules context="##Alerts" />
+ <IncludeRules context="##Modelines" />
+ </context>
<context attribute="Strings" lineEndContext="#stay" name="String">
<RegExpr attribute="Strings" context="#pop" String="&quot;(?=[ );]|$)" />
<RegExpr attribute="Escapes" context="#stay" String="\\[&quot;$n\\]" />
<IncludeRules context="Detect Variables"/>
<IncludeRules context="Detect Generator Expressions"/>
</context>
+ <context attribute="Strings" lineEndContext="#stay" name="Bracketed String" dynamic="true">
+ <RegExpr attribute="Strings" context="#pop" String="\]%1\]" dynamic="true" />
+ </context>
</contexts>
<itemDatas>
diff --git a/src/syntax/data/cpp.xml b/src/syntax/data/cpp.xml
index cec7f1b..901f7b1 100644
--- a/src/syntax/data/cpp.xml
+++ b/src/syntax/data/cpp.xml
@@ -203,6 +203,7 @@
</Float>
<HlCOct attribute="Octal" context="#stay"/>
<HlCHex attribute="Hex" context="#stay"/>
+ <RegExpr attribute="Binary" context="#stay" String="0b[01]+[ul]{0,3}" insensitive="true" />
<Int attribute="Decimal" context="#stay">
<StringDetect attribute="Decimal" context="#stay" String="ULL" insensitive="TRUE"/>
<StringDetect attribute="Decimal" context="#stay" String="LUL" insensitive="TRUE"/>
@@ -305,6 +306,7 @@
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
+ <itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
<itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="String" defStyleNum="dsString"/>
diff --git a/src/syntax/data/cpp11.xml b/src/syntax/data/cpp11.xml
index 2bcaf81..a6d89ce 100644
--- a/src/syntax/data/cpp11.xml
+++ b/src/syntax/data/cpp11.xml
@@ -11,7 +11,7 @@
<language
name="C++11"
section="Sources"
- version="1.62"
+ version="1.65"
kateversion="2.4"
indenter="cppstyle"
mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr"
@@ -105,8 +105,11 @@
<!-- 7.6 Attributes -->
<list name="attributes">
+ <!-- C++11 -->
<item> noreturn </item>
<item> carries_dependency </item>
+ <!-- C++1y -->
+ <item> deprecated </item>
</list>
<list name="types">
@@ -181,18 +184,16 @@
<!-- Match keywords -->
<keyword attribute="Keyword" context="#stay" String="keywords" />
<!-- Detect attributes -->
- <Detect2Chars attribute="Normal Text" context="Attribute" char="[" char1="[" />
- <!-- Match GCC extensions -->
- <IncludeRules context="DetectGccExtensions##GCCExtensions" />
+ <Detect2Chars attribute="Symbol" context="Attribute" char="[" char1="[" />
<!-- Match numbers -->
- <!-- ATTENTION Builtin number detectors have strange behaviour and definitely lack of required features
- -->
+ <!-- ATTENTION Builtin number detectors have strange behaviour and definitely lack of required features -->
<!-- NOTE Order is important! -->
- <RegExpr attribute="Hex" context="#stay" String="[\+\-]?0x[0-9A-Fa-f]+([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
+ <RegExpr attribute="Hex" context="#stay" String="[\+\-]?0x[0-9A-Fa-f]('?[0-9A-Fa-f]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
+ <RegExpr attribute="Binary" context="#stay" String="0[Bb][01]('?[01]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Float" context="#stay" String="[\+\-]?([0-9]+[Ee][\+\-]?[0-9]+|([0-9]+\.|\.[0-9]+|[0-9]+\.[0-9]+)([Ee][\+\-]?[0-9]+)?)[FfLl]?" />
- <RegExpr attribute="Octal" context="#stay" String="[\+\-]?0[0-7]+([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
- <RegExpr attribute="Decimal" context="#stay" String="[\+\-]?(0|[1-9][0-9]*)([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
- <RegExpr attribute="Error" context="#stay" String="[\+\-]?(0|[1-9][0-9]*)[0-9A-Za-z][_0-9A-Za-z]*\b" />
+ <RegExpr attribute="Octal" context="#stay" String="[\+\-]?0'?[0-7]('?[0-7]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
+ <RegExpr attribute="Decimal" context="#stay" String="[\+\-]?(0|[1-9]('?[0-9]+)*)([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
+ <RegExpr attribute="Error" context="#stay" String="[\+\-]?(0x?|[1-9][0-9]*)[0-9A-Za-z][_0-9A-Za-z]*\b" />
<!-- Match string literals -->
<DetectChar attribute="String" context="String" char="&quot;" />
<Detect2Chars attribute="String" context="String" char="U" char1="&quot;" />
@@ -205,6 +206,8 @@
<Detect2Chars attribute="String" context="Char Literal" char="L" char1="'" />
<Detect2Chars attribute="String" context="U-Char Literal" char="u" char1="'" />
<Detect2Chars attribute="String" context="U-Char Literal" char="U" char1="'" />
+ <!-- Match GCC extensions -->
+ <IncludeRules context="DetectGccExtensions##GCCExtensions" />
<!-- Match most used namespaces and styles -->
<StringDetect attribute="Standard Classes" context="Standard Classes" String="std::" />
<StringDetect attribute="Boost Stuff" context="Boost Stuff" String="boost::" />
@@ -291,9 +294,11 @@
</context>
<context name="Attribute" attribute="Attribute" lineEndContext="#stay">
- <keyword attribute="Attribute" context="#stay" String="attributes" />
- <Detect2Chars attribute="Normal Text" context="#pop" char="]" char1="]" />
- <DetectIdentifier context="#stay" attribute="Error" />
+ <keyword attribute="Standard Attribute" context="#stay" String="attributes" />
+ <Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" />
+ <AnyChar context="#stay" String="&ns_punctuators;" attribute="Symbol" />
+ <!-- Attributes may contain some text: [[deprecated("Reason text")]] -->
+ <DetectChar attribute="String" context="String" char="&quot;" />
</context>
<context name="RawString" attribute="String" lineEndContext="#stay" dynamic="true">
@@ -453,9 +458,11 @@
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false" />
<itemData name="Type Modifiers" defStyleNum="dsDataType" spellChecking="false" />
<itemData name="Attribute" defStyleNum="dsKeyword" spellChecking="false" bold="false" italic="true" />
+ <itemData name="Standard Attribute" defStyleNum="dsKeyword" spellChecking="false" bold="false" italic="true" />
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" />
+ <itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false" />
<itemData name="Char" defStyleNum="dsChar" spellChecking="false" />
<itemData name="String" defStyleNum="dsString" spellChecking="true" />
diff --git a/src/syntax/data/rest.xml b/src/syntax/data/rest.xml
index a97524e..76c476a 100644
--- a/src/syntax/data/rest.xml
+++ b/src/syntax/data/rest.xml
@@ -6,7 +6,7 @@
<!ENTITY SimpleReferenceNameChars "\w-_\.:\+">
]>
<!-- Copyright Matt Williams <matt@milliams.com> June 2010 -->
-<language name="reStructuredText" extensions="*.rst" section="Markup" mimetype="text/x-rst" version="1.01" kateversion="2.4" casesensitive="1">
+<language name="reStructuredText" extensions="*.rst" section="Markup" mimetype="text/x-rst" version="1.02" kateversion="2.4" casesensitive="1">
<highlighting>
@@ -21,24 +21,56 @@
<RegExpr attribute="FootnoteReference" context="#stay" String="&inlinestart;\[[^\s].*\]_&inlineend;" minimal="true"/>
<RegExpr attribute="HyperlinkRefOrInterpretedText" context="#stay" String="&inlinestart;`[^\s].*(`|`_)&inlineend;" minimal="true"/>
<RegExpr attribute="HyperlinkReference" context="#stay" String="\w+_(\s|$)" minimal="true"/>
+ <RegExpr attribute="Role" String=":[^:]+:" context="Role" />
<DetectChar attribute="Field" context="Field" firstNonSpace="true" char=":"/>
<RegExpr attribute="Footnote" context="#stay" String="^\s*\.\. \[(\d+|#|\*|#[&SimpleReferenceNameChars;]+)\]\s" minimal="true" firstNonSpace="true"/>
<RegExpr attribute="Citation" context="#stay" String="^\s*\.\. \[[&SimpleReferenceNameChars;]+\]\s" minimal="true" firstNonSpace="true"/>
<RegExpr attribute="HyperlinkTarget" context="#stay" String="^\s*(\.\. (__:|_[&SimpleReferenceNameChars; ]+:(\s|$))|__ )" minimal="true" firstNonSpace="true"/>
+ <RegExpr attribute="CMakeCode" String="\s*\.\. code-block::\s*cmake$" context="CMakeCodeBlock" />
+ <RegExpr attribute="CppCode" String="\s*\.\. code-block::\s*c\+\+" context="CppCodeBlock" />
<RegExpr attribute="Directive" context="#stay" String="^\s*\.\. [\w-_\.]+::(\s|$)" minimal="true" firstNonSpace="true"/>
+ <RegExpr attribute="Code" String="::$" context="CodeBlock" />
<RegExpr attribute="SubstitutionDefinition" context="#stay" String="^\s*\.\. \|[&SimpleReferenceNameChars; ]+\|\s+[&SimpleReferenceNameChars;]+::\s" minimal="true" firstNonSpace="true"/>
</context>
<context name="Field" attribute="Field" lineEndContext="#stay">
<DetectChar attribute="Field" context="#pop" char=":"/>
<Detect2Chars attribute="Field" context="#stay" char="\" char1=":"/>
</context>
+ <context name="HyperlinkRefOrInterpretedText" attribute="HyperlinkRefOrInterpretedText" lineEndContext="#pop">
+ <DetectChar attribute="HyperlinkRefOrInterpretedText" char="`" context="#pop" />
+ </context>
+ <context name="Role" attribute="Role" lineEndContext="#pop">
+ <RegExpr attribute="Keyword" String="\w+" context="#stay" />
+ <DetectChar attribute="HyperlinkRefOrInterpretedText" char="`" context="#pop!HyperlinkRefOrInterpretedText" />
+ </context>
+ <context name="CMakeCodeBlock" attribute="CMakeCode" lineEndContext="#stay">
+ <RegExpr attribute="CMakeCode" String="^\s" context="CMakeCode" />
+ </context>
+ <context name="CppCodeBlock" attribute="CppCode" lineEndContext="#stay">
+ <RegExpr attribute="CppCode" String="^\s" context="CppCode" />
+ </context>
+ <context name="CodeBlock" attribute="Code" lineEndContext="#stay">
+ <RegExpr attribute="Code" String="^\s" context="Code" />
+ </context>
+
+ <context name="CMakeCode" attribute="CMakeCode" lineEndContext="#stay">
+ <RegExpr attribute="Normal" String="^\S" lookAhead="true" context="#pop#pop" />
+ <IncludeRules context="##CMake" includeAttrib="true"/>
+ </context>
+ <context name="CppCode" attribute="CppCode" lineEndContext="#stay">
+ <RegExpr attribute="Normal" String="^\S" lookAhead="true" context="#pop#pop" />
+ <IncludeRules context="##C++" includeAttrib="true"/>
+ </context>
+ <context name="Code" attribute="Code" lineEndContext="#stay">
+ <RegExpr attribute="Normal" String="^\S" lookAhead="true" context="#pop#pop" />
+ </context>
</contexts>
<itemDatas>
<itemData name="Normal" defStyleNum="dsNormal" />
<itemData name="Bold" defStyleNum="dsNormal" bold="1" />
<itemData name="Italic" defStyleNum="dsNormal" italic="1" />
- <itemData name="InlineLiteral" defStyleNum="dsString" />
+ <itemData name="InlineLiteral" defStyleNum="dsDataType" />
<itemData name="SubstitutionReference" defStyleNum="dsFunction" />
<itemData name="InlineInternalTarget" defStyleNum="dsFunction" />
<itemData name="FootnoteReference" defStyleNum="dsOthers" />
@@ -51,6 +83,10 @@
<itemData name="HyperlinkTarget" defStyleNum="dsDataType" />
<itemData name="Directive" defStyleNum="dsDataType" />
<itemData name="SubstitutionDefinition" defStyleNum="dsDataType" />
+ <itemData name="Role" defStyleNum="dsNormal" bold="1" />
+ <itemData name="CMakeCode" defStyleNum="dsDataType" />
+ <itemData name="CppCode" defStyleNum="dsDataType" />
+ <itemData name="Code" defStyleNum="dsDataType" />
</itemDatas>
</highlighting>