Warning, /frameworks/syntax-highlighting/data/syntax/lex.xml is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8"?> 0002 <!DOCTYPE language> 0003 <!-- 0004 ======================================================================== 0005 0006 LEX.XML supports syntax highlighting for Lex/Flex source under Kate. 0007 0008 Copyright (C) 2004 - Jan Villat <jan.villat@net2000.ch> 0009 This code is released under the LGPL as part of kdelibs/kate. 0010 0011 ======================================================================== 0012 0013 Updates for LEX.XML can be obtained from http://kate.kde.org/hl/ 0014 0015 UPDATE HISTORY:- 0016 2004.05.25 - LEX.XML 1.00 - First released. 0017 0018 TODO:- 0019 - Add a mime type (cannot find it !?) 0020 0021 ======================================================================== 0022 --> 0023 <language name="Lex/Flex" version="7" kateversion="5.79" section="Sources" extensions="*.l;*.lex;*.flex" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL"> 0024 0025 <highlighting> 0026 <contexts> 0027 <context name="Pre Start" attribute="Normal Text" lineEndContext="#stay"> 0028 <RegExpr attribute="Normal Text" context="Definitions" String="." lookAhead="true" beginRegion="definitions" /> 0029 </context> 0030 <context name="Definitions" attribute="Normal Text" lineEndContext="#stay"> 0031 <IncludeRules context="Detect C" /> 0032 <Detect2Chars attribute="Content-Type Delimiter" context="Rules" char="%" char1="%" beginRegion="rules" endRegion="definitions" /> 0033 <DetectChar attribute="Directive" context="Percent Command" char="%" /> 0034 <Detect2Chars attribute="Comment" context="Comment" char="/" char1="*" column="0" beginRegion="BlockComment"/> 0035 <RegExpr attribute="Definition" context="Definition RegExpr" String="^[A-Za-z_]\w*\s+" column="0"/> 0036 </context> 0037 <context name="Rules" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Rule RegExpr"> 0038 <IncludeRules context="Detect C" /> 0039 <Detect2Chars attribute="Content-Type Delimiter" context="User Code" char="%" char1="%" beginRegion="code" endRegion="rules" /> 0040 </context> 0041 <context name="User Code" attribute="Normal Text" lineEndContext="#stay"> 0042 <IncludeRules context="##C++" /> 0043 </context> 0044 0045 <context name="Percent Command" attribute="Directive" lineEndContext="#pop"> 0046 </context> 0047 <context name="Comment" attribute="Comment" lineEndContext="#stay"> 0048 <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="BlockComment"/> 0049 <DetectSpaces /> 0050 <IncludeRules context="##Comments" /> 0051 </context> 0052 0053 <context name="Definition RegExpr" attribute="RegExpr" lineEndContext="#pop"> 0054 <IncludeRules context="RegExpr Base" /> 0055 <RegExpr attribute="RegExpr" context="#stay" String="\S" /> 0056 <RegExpr attribute="Alert" context="#stay" String=".*" /> 0057 </context> 0058 <context name="Rule RegExpr" attribute="RegExpr" lineEndContext="#pop"> 0059 <LineContinue attribute="Content-Type Delimiter" context="Start Conditions Scope" char="{" beginRegion="SCscope" /> 0060 <IncludeRules context="RegExpr Base" /> 0061 <RegExpr attribute="RegExpr" context="#stay" String="\S" /> 0062 <DetectSpaces attribute="Normal Text" context="Action" /> 0063 </context> 0064 <context name="RegExpr (" attribute="RegExpr" lineEndContext="#stay"> 0065 <IncludeRules context="RegExpr Base" /> 0066 <DetectChar attribute="RegExpr" context="#pop" char=")" /> 0067 <RegExpr attribute="RegExpr" context="#stay" String="." /> 0068 </context> 0069 <context name="RegExpr [" attribute="RegExpr" lineEndContext="#stay"> 0070 <RegExpr attribute="Backslash Code" context="#stay" String="\\." /> 0071 <DetectChar attribute="RegExpr" context="#pop" char="]" /> 0072 <RegExpr attribute="RegExpr" context="#stay" String="." /> 0073 </context> 0074 <context name="RegExpr {" attribute="RegExpr" lineEndContext="#stay"> 0075 <RegExpr attribute="Backslash Code" context="#stay" String="\\." /> 0076 <DetectChar attribute="RegExpr" context="#pop" char="}" /> 0077 <RegExpr attribute="RegExpr" context="#stay" String="." /> 0078 </context> 0079 <context name="RegExpr Q" attribute="RegExpr" lineEndContext="#stay"> 0080 <RegExpr attribute="Backslash Code" context="#stay" String="\\." /> 0081 <DetectChar attribute="RegExpr" context="#pop" char=""" /> 0082 <RegExpr attribute="RegExpr" context="#stay" String="." /> 0083 </context> 0084 <context name="RegExpr Base" attribute="RegExpr" lineEndContext="#stay"> 0085 <RegExpr attribute="Backslash Code" context="#stay" String="\\." /> 0086 <DetectChar attribute="RegExpr" context="RegExpr (" char="(" /> 0087 <DetectChar attribute="RegExpr" context="RegExpr [" char="[" /> 0088 <DetectChar attribute="RegExpr" context="RegExpr {" char="{" /> 0089 <DetectChar attribute="RegExpr" context="RegExpr Q" char=""" /> 0090 </context> 0091 0092 <context name="Start Conditions Scope" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Rule RegExpr"> 0093 <RegExpr attribute="Content-Type Delimiter" context="#pop" String="\s*\}" endRegion="SCscope" /> 0094 <DetectSpaces attribute="Normal Text" context="Rule RegExpr" /> 0095 </context> 0096 0097 <context name="Action" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="Action C"> 0098 <RegExpr attribute="Directive" context="#stay" String="\|\s*$" /> 0099 <Detect2Chars attribute="Content-Type Delimiter" context="Lex Rule C Bloc" char="%" char1="{" beginRegion="lexCbloc" /> 0100 </context> 0101 0102 <context name="Detect C" attribute="Normal Text" lineEndContext="#stay"> 0103 <DetectSpaces attribute="Normal Text" context="Indented C" column="0" /> 0104 <Detect2Chars attribute="Content-Type Delimiter" context="Lex C Bloc" char="%" char1="{" beginRegion="lexCbloc" column="0"/> 0105 </context> 0106 <context name="Indented C" attribute="Normal Text" lineEndContext="#pop"> 0107 <IncludeRules context="##C++" /> 0108 </context> 0109 <context name="Lex C Bloc" attribute="Normal Text" lineEndContext="#stay"> 0110 <Detect2Chars attribute="Content-Type Delimiter" context="#pop" char="%" char1="}" endRegion="lexCbloc" column="0"/> 0111 <IncludeRules context="##C++" /> 0112 </context> 0113 <context name="Lex Rule C Bloc" attribute="Normal Text" lineEndContext="#stay"> 0114 <Detect2Chars attribute="Content-Type Delimiter" context="#pop" char="%" char1="}" endRegion="lexCbloc" /> 0115 <IncludeRules context="##C++" /> 0116 </context> 0117 <context name="Normal C Bloc" attribute="Normal Text" lineEndContext="#stay"> 0118 <DetectChar attribute="Normal Text" context="Normal C Bloc" char="{" beginRegion="bloc" /> 0119 <DetectChar attribute="Normal Text" context="#pop" char="}" endRegion="bloc" /> 0120 <IncludeRules context="##C++" /> 0121 </context> 0122 <context name="Action C" attribute="Normal Text" lineEndContext="#pop"> 0123 <DetectChar attribute="Normal Text" context="Normal C Bloc" char="{" beginRegion="bloc" /> 0124 <DetectChar attribute="Alert" context="#stay" char="}" /> 0125 <IncludeRules context="##C++" /> 0126 </context> 0127 </contexts> 0128 0129 <itemDatas> 0130 <itemData name="Normal Text" defStyleNum="dsNormal" /> 0131 <itemData name="Definition" defStyleNum="dsDataType" /> 0132 <itemData name="Comment" defStyleNum="dsComment" /> 0133 <itemData name="Content-Type Delimiter" defStyleNum="dsBaseN" bold="1" /> 0134 <itemData name="Directive" defStyleNum="dsKeyword"/> 0135 <itemData name="RegExpr" defStyleNum="dsString" /> 0136 <itemData name="Backslash Code" defStyleNum="dsString" bold="1" /> 0137 <itemData name="Alert" defStyleNum="dsAlert" /> 0138 </itemDatas> 0139 0140 </highlighting> 0141 <general> 0142 <comments> 0143 <comment name="multiLine" start="/*" end="*/" /> 0144 </comments> 0145 </general> 0146 </language> 0147 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->