Warning, /frameworks/syntax-highlighting/data/syntax/logcat.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language
0003 [
0004         <!ENTITY datetime "(?:(?:.\[)?(?:\d{1,2};){2}\d{1,3}m\s*)?(?:(?:\d{4}\-)?\d{2}\-\d{2}\s\d{2}(?:\:\d{2}){2}\.\d{3,6}(?:\s[\-\+]\d{4})?|\d+\.\d{3,6})\:?">
0005         <!ENTITY priority_tag "(?:[/\s][^:\(]*(?:\([^\)]+\))?:|\([^\)]+\):?)"> <!-- Tag/PID/Threads -->
0006         <!ENTITY delim        "[/\(\s]"> <!-- Delimiter between priority and tag -->
0007 ]>
0008 
0009 <!--
0010    Logcat Syntax Highlighting Definition
0011   ===========================================================================
0012 
0013    This file is part of the KDE's KSyntaxHighlighting framework.
0014 
0015    SPDX-FileCopyrightText: 2018-2020 Nibaldo González S. <nibgonz@gmail.com>
0016 
0017    SPDX-License-Identifier: MIT
0018 
0019   ===========================================================================
0020 
0021   Last update: September 30, 2020 (v6)
0022 -->
0023 
0024 <language name="Logcat"
0025           version="9"
0026           kateversion="5.0"
0027           section="Other"
0028           extensions="*.logcat"
0029           mimetype="text/x-logcat"
0030           priority="5"
0031           author="Nibaldo González (nibgonz@gmail.com)"
0032           license="MIT">
0033 
0034         <highlighting>
0035 
0036                 <contexts>
0037 
0038                         <context name="Normal" attribute="Normal Text" lineEndContext="#stay">
0039                                 <DetectChar   context="CommentLine" attribute="Comment" char="#" firstNonSpace="true" />
0040                                 <StringDetect context="CommentLine" attribute="Comment" String="---------" firstNonSpace="true" />
0041                                 <RegExpr      context="#stay"       attribute="Comment" String="^\*\s.+\s\*$" column="0" />
0042 
0043                                 <RegExpr context="#stay" attribute="DateTime" String="&datetime;" firstNonSpace="true" />
0044 
0045                                 <!-- Priority & Tag -->
0046                                 <RegExpr context="VerboseMsg" attribute="Verbose Tag" String="(?:^|\s)[V\?](?:&priority_tag;|(?=&delim;))" />
0047                                 <RegExpr context="DebugMsg"   attribute="Debug Tag"   String="(?:^|\s)D(?:&priority_tag;|(?=&delim;))" />
0048                                 <RegExpr context="InfoMsg"    attribute="Info Tag"    String="(?:^|\s)I(?:&priority_tag;|(?=&delim;))" />
0049                                 <RegExpr context="WarningMsg" attribute="Warning Tag" String="(?:^|\s)W(?:&priority_tag;|(?=&delim;))" />
0050                                 <RegExpr context="AssertMsg"  attribute="Assert Tag"  String="(?:^|\s)A(?:&priority_tag;|(?=&delim;))" />
0051                                 <RegExpr context="SilentMsg"  attribute="Silent Tag"  String="(?:^|\s)S(?:&priority_tag;|(?=&delim;))" />
0052                                 <RegExpr context="ErrorMsg"   attribute="Error Tag"   String="(?:^|\s)E(?:&priority_tag;|(?=&delim;))" />
0053 
0054                                 <RegExpr context="#stay"      attribute="Error Tag"   String="\sF&delim;.*\033\[\d{1,3}m$" />
0055                                 <RegExpr context="FatalMsg"   attribute="Fatal"       String="^F&delim;" column="0" />
0056                                 <RegExpr context="FatalMsg"   attribute="Normal Text" String="\s(?=F&delim;)" />
0057 
0058                                 <!-- For "-v long" -->
0059                                 <DetectChar context="LongLog" attribute="Normal Text" char="[" column="0" />
0060                         </context>
0061 
0062                         <context name="CommentLine" attribute="Comment" lineEndContext="#pop">
0063                                 <DetectSpaces />
0064                                 <IncludeRules context="##Comments" />
0065                         </context>
0066 
0067                         <context name="VerboseMsg" attribute="Verbose Message" lineEndContext="#pop" />
0068                         <context name="DebugMsg"   attribute="Debug Message"   lineEndContext="#pop" />
0069                         <context name="InfoMsg"    attribute="Info Message"    lineEndContext="#pop" />
0070                         <context name="WarningMsg" attribute="Warning Message" lineEndContext="#pop" />
0071                         <context name="AssertMsg"  attribute="Assert Message"  lineEndContext="#pop" />
0072                         <context name="SilentMsg"  attribute="Silent Message"  lineEndContext="#pop" />
0073                         <context name="ErrorMsg"   attribute="Error Message"   lineEndContext="#pop" />
0074                         <context name="FatalMsg"   attribute="Fatal"           lineEndContext="#pop" />
0075 
0076                         <!-- Long Format -->
0077 
0078                         <context name="LongLog" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
0079                                 <RegExpr context="#pop!LongLogTag" attribute="DateTime" String="\s+&datetime;(?=\s.+\s\]$)" />
0080                         </context>
0081                         <context name="LongLogTag" attribute="Normal Text" lineEndContext="#pop">
0082                                 <RegExpr context="#pop!LongLogVerbose" attribute="Verbose Tag" String="\s[V\?]&delim;" />
0083                                 <RegExpr context="#pop!LongLogDebug"   attribute="Debug Tag"   String="\sD&delim;" />
0084                                 <RegExpr context="#pop!LongLogInfo"    attribute="Info Tag"    String="\sI&delim;" />
0085                                 <RegExpr context="#pop!LongLogWarning" attribute="Warning Tag" String="\sW&delim;" />
0086                                 <RegExpr context="#pop!LongLogAssert"  attribute="Assert Tag"  String="\sA&delim;" />
0087                                 <RegExpr context="#pop!LongLogSilent"  attribute="Silent Tag"  String="\sS&delim;" />
0088                                 <RegExpr context="#pop!LongLogError"   attribute="Error Tag"   String="\sE&delim;" />
0089                                 <RegExpr context="#pop!LongLogFatal"   attribute="Normal Text" String="\s(?=F&delim;)" />
0090                         </context>
0091 
0092                         <context name="LongLogVerbose" attribute="Verbose Tag" lineEndContext="#pop">
0093                                 <LineContinue context="#pop!LongLogVerboseMsg" attribute="Normal Text" char="]" />
0094                         </context>
0095                         <context name="LongLogDebug" attribute="Debug Tag" lineEndContext="#pop">
0096                                 <LineContinue context="#pop!LongLogDebugMsg" attribute="Normal Text" char="]" />
0097                         </context>
0098                         <context name="LongLogInfo" attribute="Info Tag" lineEndContext="#pop">
0099                                 <LineContinue context="#pop!LongLogInfoMsg" attribute="Normal Text" char="]" />
0100                         </context>
0101                         <context name="LongLogWarning" attribute="Warning Tag" lineEndContext="#pop">
0102                                 <LineContinue context="#pop!LongLogWarningMsg" attribute="Normal Text" char="]" />
0103                         </context>
0104                         <context name="LongLogAssert" attribute="Assert Tag" lineEndContext="#pop">
0105                                 <LineContinue context="#pop!LongLogAssertMsg" attribute="Normal Text" char="]" />
0106                         </context>
0107                         <context name="LongLogSilent" attribute="Silent Tag" lineEndContext="#pop">
0108                                 <LineContinue context="#pop!LongLogSilentMsg" attribute="Normal Text" char="]" />
0109                         </context>
0110                         <context name="LongLogError" attribute="Error Tag" lineEndContext="#pop">
0111                                 <LineContinue context="#pop!LongLogErrorMsg" attribute="Normal Text" char="]" />
0112                         </context>
0113                         <context name="LongLogFatal" attribute="Fatal" lineEndContext="#pop">
0114                                 <RegExpr context="#pop!LongLogFatalMsg" attribute="Normal Text" String="\s*\]$" />
0115                         </context>
0116 
0117                         <context name="LongLogVerboseMsg" attribute="Verbose Message" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0118                                 <IncludeRules context="DefaultLongLogMsg" />
0119                         </context>
0120                         <context name="LongLogDebugMsg" attribute="Debug Message" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0121                                 <IncludeRules context="DefaultLongLogMsg" />
0122                         </context>
0123                         <context name="LongLogInfoMsg" attribute="Info Message" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0124                                 <IncludeRules context="DefaultLongLogMsg" />
0125                         </context>
0126                         <context name="LongLogWarningMsg" attribute="Warning Message" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0127                                 <IncludeRules context="DefaultLongLogMsg" />
0128                         </context>
0129                         <context name="LongLogAssertMsg" attribute="Assert Message" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0130                                 <IncludeRules context="DefaultLongLogMsg" />
0131                         </context>
0132                         <context name="LongLogSilentMsg" attribute="Silent Message" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0133                                 <IncludeRules context="DefaultLongLogMsg" />
0134                         </context>
0135                         <context name="LongLogErrorMsg" attribute="Error Message" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0136                                 <IncludeRules context="DefaultLongLogMsg" />
0137                         </context>
0138                         <context name="LongLogFatalMsg" attribute="Fatal" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0139                                 <IncludeRules context="DefaultLongLogMsg" />
0140                         </context>
0141                         <context name="DefaultLongLogMsg" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="EmptyLine">
0142                                 <StringDetect context="#pop!CommentLine" attribute="Comment" String="---------" firstNonSpace="true" />
0143                                 <RegExpr context="#pop" attribute="Comment" String="^\*\s.+\s\*$" column="0" />
0144                                 <RegExpr context="#pop!LongLog" attribute="Normal Text" String="^\[(?=\s+&datetime;\s.+\s\]$)" column="0" />
0145                                 <RegExpr context="EmptyLine" attribute="Normal Text" String="^\s*$" column="0" />
0146                         </context>
0147                         <context name="EmptyLine" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
0148                                 <DetectChar context="#pop#pop!CommentLine" attribute="Comment" char="#" firstNonSpace="true" />
0149                                 <RegExpr context="#pop#pop!LongLog" attribute="Normal Text" String="^\[(?=\s.+\s\]$)" column="0" />
0150                                 <!-- In a normal Log this is not necessary, but probably some people put items of Logs
0151                                      of different formats in a single file. -->
0152                                 <RegExpr context="#pop#pop" attribute="DateTime" String="&datetime;" firstNonSpace="true" />
0153                                 <!-- NOTE: Use "^\s*" with lookAhead, not firstNonSpace -->
0154                                 <RegExpr context="#pop#pop" attribute="Normal Text" String="^\s*[VDIWASEF\?]&priority_tag;" column="0" lookAhead="true" minimal="1" />
0155                                 <DetectSpaces />
0156                         </context>
0157 
0158                 </contexts>
0159 
0160                 <itemDatas>
0161                         <itemData name="Normal Text" defStyleNum="dsNormal"  spellChecking="false" />
0162                         <itemData name="Comment"     defStyleNum="dsComment" italic="1" />
0163                         <itemData name="DateTime"    defStyleNum="dsComment" italic="0" underline="0" spellChecking="false" />
0164 
0165                         <itemData name="Verbose Tag"     defStyleNum="dsNormal"         bold="1" italic="0" underline="0" strikeOut="0" />
0166                         <itemData name="Verbose Message" defStyleNum="dsNormal"         bold="0" italic="0" underline="0" strikeOut="0" />
0167                         <itemData name="Debug Tag"       defStyleNum="dsAttribute"      bold="1" italic="0" underline="0" strikeOut="0" />
0168                         <itemData name="Debug Message"   defStyleNum="dsAttribute"      bold="0" italic="0" underline="0" strikeOut="0" />
0169                         <itemData name="Info Tag"        defStyleNum="dsPreprocessor"   bold="1" italic="0" underline="0" strikeOut="0" />
0170                         <itemData name="Info Message"    defStyleNum="dsPreprocessor"   bold="0" italic="0" underline="0" strikeOut="0" />
0171                         <itemData name="Warning Tag"     defStyleNum="dsInformation"    bold="1" italic="0" underline="0" strikeOut="0" />
0172                         <itemData name="Warning Message" defStyleNum="dsInformation"    bold="0" italic="0" underline="0" strikeOut="0" />
0173                         <itemData name="Assert Tag"      defStyleNum="dsChar"           bold="1" italic="0" underline="0" strikeOut="0" />
0174                         <itemData name="Assert Message"  defStyleNum="dsChar"           bold="0" italic="0" underline="0" strikeOut="0" />
0175                         <itemData name="Silent Tag"      defStyleNum="dsBuiltIn"        bold="1" italic="0" underline="0" strikeOut="0" />
0176                         <itemData name="Silent Message"  defStyleNum="dsBuiltIn"        bold="0" italic="0" underline="0" strikeOut="0" />
0177                         <itemData name="Error Tag"       defStyleNum="dsError"          bold="1" italic="0" underline="0" strikeOut="0" />
0178                         <itemData name="Error Message"   defStyleNum="dsError"          bold="0" italic="0" underline="0" strikeOut="0" />
0179                         <itemData name="Fatal"           defStyleNum="dsAlert"          bold="1" italic="0" underline="0" strikeOut="0" />
0180                 </itemDatas>
0181 
0182         </highlighting>
0183 
0184         <general>
0185                 <comments>
0186                         <comment name="singleLine" start="#" />
0187                 </comments>
0188 
0189                 <emptyLines>
0190                         <emptyLine regexpr="\s+"/>
0191                 </emptyLines>
0192         </general>
0193 
0194 </language>
0195 <!-- kate: replace-tabs off; remove-trailing-spaces mod; dynamic-word-wrap off; -->