~ubuntu-branches/ubuntu/oneiric/kde4libs/oneiric-proposed

« back to all changes in this revision

Viewing changes to kate/syntax/data/lex.xml

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-07-08 00:08:34 UTC
  • mto: This revision was merged to the branch mainline in revision 247.
  • Revision ID: package-import@ubuntu.com-20110708000834-dr9a8my4iml90qe5
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
<!DOCTYPE language SYSTEM "language.dtd">
3
 
<!--
4
 
  ========================================================================
5
 
 
6
 
  LEX.XML supports syntax highlighting for Lex/Flex source under Kate.
7
 
 
8
 
  Copyright (C) 2004 - Jan Villat <jan.villat@net2000.ch>
9
 
  This code is released under the LGPL as part of kdelibs/kate.
10
 
 
11
 
  ========================================================================
12
 
 
13
 
  Updates for LEX.XML can be obtained from http://kate.kde.org/hl/
14
 
 
15
 
  UPDATE HISTORY:-
16
 
  2004.05.25 - LEX.XML 1.00        - First released.
17
 
 
18
 
  TODO:-
19
 
  - Add a mime type (cannot find it !?)
20
 
  
21
 
  ========================================================================
22
 
-->
23
 
<language name="Lex/Flex" version="1.01" kateversion="2.4" section="Sources" extensions="*.l;*.lex;*.flex" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL">
24
 
 
25
 
<highlighting>
26
 
<contexts>
27
 
  <context name="Pre Start" attribute="Normal Text" lineEndContext="#stay">
28
 
    <RegExpr attribute="Normal Text" context="Definitions" String="." lookAhead="true" beginRegion="definitions" />
29
 
  </context>
30
 
  <context name="Definitions" attribute="Normal Text" lineEndContext="#stay">
31
 
    <IncludeRules context="Detect C" />
32
 
    <Detect2Chars attribute="Content-Type Delimiter" context="Rules" char="%" char1="%" beginRegion="rules" endRegion="definitions" />
33
 
    <DetectChar attribute="Directive" context="Percent Command" char="%" />
34
 
    <Detect2Chars attribute="Comment" context="Comment" char="/" char1="*" column="0"/>
35
 
    <RegExpr attribute="Definition" context="Definition RegExpr" String="[A-Za-z_]\w*\s+" column="0"/>
36
 
  </context>
37
 
  <context name="Rules" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Rule RegExpr">
38
 
    <IncludeRules context="Detect C" />
39
 
    <Detect2Chars attribute="Content-Type Delimiter" context="User Code" char="%" char1="%" beginRegion="code" endRegion="rules" />
40
 
  </context>
41
 
  <context name="User Code" attribute="Normal Text" lineEndContext="#stay">
42
 
    <IncludeRules context="##C++" />
43
 
  </context>
44
 
  
45
 
  <context name="Percent Command" attribute="Directive" lineEndContext="#pop">
46
 
  </context>
47
 
  <context name="Comment" attribute="Comment" lineEndContext="#stay">
48
 
    <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" />
49
 
  </context>
50
 
 
51
 
  <context name="Definition RegExpr" attribute="RegExpr" lineEndContext="#pop">
52
 
    <IncludeRules context="RegExpr Base" />
53
 
    <RegExpr attribute="RegExpr" context="#stay" String="\S" />  
54
 
    <RegExpr attribute="Alert" context="#stay" String=".*" />  
55
 
  </context>
56
 
  <context name="Rule RegExpr" attribute="RegExpr" lineEndContext="#pop">
57
 
    <RegExpr attribute="Content-Type Delimiter" context="Start Conditions Scope" String="\{$" beginRegion="SCscope" />  
58
 
    <IncludeRules context="RegExpr Base" />
59
 
    <RegExpr attribute="RegExpr" context="#stay" String="\S" />  
60
 
    <RegExpr attribute="Normal Text" context="Action" String="\s+" />  
61
 
  </context>
62
 
  <context name="RegExpr (" attribute="RegExpr" lineEndContext="#stay">
63
 
    <IncludeRules context="RegExpr Base" />
64
 
    <DetectChar attribute="RegExpr" context="#pop" char=")" />  
65
 
    <RegExpr attribute="RegExpr" context="#stay" String="." />
66
 
  </context>
67
 
  <context name="RegExpr [" attribute="RegExpr" lineEndContext="#stay">
68
 
    <RegExpr attribute="Backslash Code" context="#stay" String="\\." />
69
 
    <DetectChar attribute="RegExpr" context="#pop" char="]" />  
70
 
    <RegExpr attribute="RegExpr" context="#stay" String="." />
71
 
  </context>
72
 
  <context name="RegExpr {" attribute="RegExpr" lineEndContext="#stay">
73
 
    <RegExpr attribute="Backslash Code" context="#stay" String="\\." />
74
 
    <DetectChar attribute="RegExpr" context="#pop" char="}" />  
75
 
    <RegExpr attribute="RegExpr" context="#stay" String="." />
76
 
  </context>
77
 
  <context name="RegExpr Q" attribute="RegExpr" lineEndContext="#stay">
78
 
    <RegExpr attribute="Backslash Code" context="#stay" String="\\." />
79
 
    <DetectChar attribute="RegExpr" context="#pop" char="&quot;" />  
80
 
    <RegExpr attribute="RegExpr" context="#stay" String="." />
81
 
  </context>
82
 
  <context name="RegExpr Base" attribute="RegExpr" lineEndContext="#stay">
83
 
    <RegExpr attribute="Backslash Code" context="#stay" String="\\." />
84
 
    <DetectChar attribute="RegExpr" context="RegExpr (" char="(" />  
85
 
    <DetectChar attribute="RegExpr" context="RegExpr [" char="[" />  
86
 
    <DetectChar attribute="RegExpr" context="RegExpr {" char="{" />  
87
 
    <DetectChar attribute="RegExpr" context="RegExpr Q" char="&quot;" />  
88
 
  </context>
89
 
  
90
 
  <context name="Start Conditions Scope" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Rule RegExpr">
91
 
    <RegExpr attribute="Content-Type Delimiter" context="#pop" String="\s*\}" endRegion="SCscope" />
92
 
    <RegExpr attribute="Normal Text" context="Rule RegExpr" String="\s*" />
93
 
  </context>
94
 
  
95
 
  <context name="Action" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="Action C">
96
 
    <RegExpr attribute="Directive" context="#stay" String="\|\s*$" />
97
 
    <Detect2Chars attribute="Content-Type Delimiter" context="Lex Rule C Bloc" char="%" char1="{" beginRegion="lexCbloc" />
98
 
  </context>
99
 
  
100
 
  <context name="Detect C" attribute="Normal Text" lineEndContext="#stay">
101
 
    <RegExpr attribute="Normal Text" context="Indented C" String="^\s" />
102
 
    <Detect2Chars attribute="Content-Type Delimiter" context="Lex C Bloc" char="%" char1="{" beginRegion="lexCbloc" column="0"/>
103
 
  </context>
104
 
  <context name="Indented C" attribute="Normal Text" lineEndContext="#pop">
105
 
    <IncludeRules context="##C++" />
106
 
  </context>
107
 
  <context name="Lex C Bloc" attribute="Normal Text" lineEndContext="#stay">
108
 
    <Detect2Chars attribute="Content-Type Delimiter" context="#pop" char="%" char1="}" endRegion="lexCbloc" column="0"/>
109
 
    <IncludeRules context="##C++" />
110
 
  </context>
111
 
  <context name="Lex Rule C Bloc" attribute="Normal Text" lineEndContext="#stay">
112
 
    <Detect2Chars attribute="Content-Type Delimiter" context="#pop" char="%" char1="}" endRegion="lexCbloc" />
113
 
    <IncludeRules context="##C++" />
114
 
  </context>
115
 
  <context name="Normal C Bloc" attribute="Normal Text" lineEndContext="#stay">
116
 
    <DetectChar attribute="Normal Text" context="Normal C Bloc" char="{" beginRegion="bloc" />  
117
 
    <DetectChar attribute="Normal Text" context="#pop" char="}" endRegion="bloc" />  
118
 
    <IncludeRules context="##C++" />
119
 
  </context>
120
 
  <context name="Action C" attribute="Normal Text" lineEndContext="#pop">
121
 
    <DetectChar attribute="Normal Text" context="Normal C Bloc" char="{" beginRegion="bloc" />  
122
 
    <DetectChar attribute="Alert" context="#stay" char="}" />  
123
 
    <IncludeRules context="##C++" />
124
 
  </context>
125
 
</contexts>
126
 
 
127
 
<itemDatas>
128
 
  <itemData name="Normal Text" defStyleNum="dsNormal" />
129
 
  <itemData name="Definition" defStyleNum="dsDataType" />
130
 
  <itemData name="Comment" defStyleNum="dsComment" />
131
 
  <itemData name="Content-Type Delimiter" defStyleNum="dsBaseN" bold="1" />
132
 
  <itemData name="Directive" defStyleNum="dsKeyword"/>
133
 
  <itemData name="RegExpr" defStyleNum="dsString" />
134
 
  <itemData name="Backslash Code" defStyleNum="dsString" bold="1" />
135
 
  <itemData name="Alert" defStyleNum="dsAlert" />
136
 
</itemDatas>
137
 
 
138
 
</highlighting>
139
 
<general>
140
 
  <comments>
141
 
    <comment name="multiLine" start="/*" end="*/" />
142
 
  </comments>
143
 
</general>
144
 
</language>