summaryrefslogtreecommitdiff
path: root/share/tinykate/syntax/makefile.xml
blob: 2abeca767823e70b10565be09ead45e7b83a4a45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- Makefile syntaxfile v0.9 by Per Wigren <wigren@home.se> -->
<language name="Makefile" section="Other" extensions="" mimetype="text/x-makefile">
	<highlighting>
		<list name = "keywords">
			<item> include </item>
			<item> define </item>
			<item> else </item>
			<item> endef </item>
			<item> endif </item>
			<item> ifdef </item>
			<item> ifeq </item>
			<item> ifndef </item>
			<item> ifneq </item>
		</list>

		<contexts>
			<context name="Normal" attribute="Normal Text" lineEndContext="0">
				<HlCStringChar attribute="Normal Text" lineEndContext="0"/>
				<keyword String="keywords" attribute="Keyword" context="0"/>
				<RegExpr String="#.*$" attribute="Comment" context="0"/>
				<RegExpr String="(^|;)\s*\S+\s*=" attribute="Variable" context="1"/>
				<RegExpr String="^.*:" attribute="Section" context="0"/>
				<RegExpr attribute="Operator" String="\$\(" context="4"/>
				<RegExpr attribute="Operator" String="\$\{" context="5"/>
				<RegExpr String="[+*/=%$():;\\]" attribute="Operator" context="0"/>
			</context>

			<context name="Value" attribute="String" lineEndContext="1">
				<HlCStringChar attribute="String Char" context="1"/>
				<RegExpr attribute="Operator" String="\\$"     context="1"/>
				<RegExpr attribute="String"   String="[^\\]?$" context="0"/>
				<RegExpr attribute="Operator" String="\$\("    context="2"/>
				<RegExpr attribute="Operator" String="\$\{"    context="3"/>
				<RegExpr attribute="Operator" String=";"       context="0"/>
			</context>

			<context name="ParanVarFromValue" attribute="Variable" lineEndContext="2">
				<HlCStringChar attribute="Variable" context="2"/>
				<RegExpr attribute="Operator" String="\)[^$]" context="1"/>
				<RegExpr attribute="Operator" String="\)$" context="0"/>
			</context>

			<context name="BrackVarFromValue" attribute="Variable" lineEndContext="3">
				<HlCStringChar attribute="Variable" context="3"/>
				<RegExpr attribute="Operator" String="\}[^$]" context="1"/>
				<RegExpr attribute="Operator" String="\}$" context="0"/>
			</context>

			<context name="ParanVarFromNormal" attribute="Variable" lineEndContext="4">
				<HlCChar attribute="Variable" context="4"/>
				<RegExpr attribute="Operator" String="\)" context="0"/>
			</context>

			<context name="BrackVarFromNormal" attribute="Variable" lineEndContext="5">
				<HlCChar attribute="Variable" context="5"/>
				<RegExpr attribute="Operator" String="\}" context="0"/>
			</context>

		</contexts>

		<itemDatas>
			<itemData name="Normal Text"	defStyleNum="dsNormal"/>
			<itemData name="Keyword"		defStyleNum="dsKeyword"/>
			<itemData name="Comment"		defStyleNum="dsComment"/>
			<itemData name="String"			defStyleNum="dsString"/>
			<itemData name="String Char"	defStyleNum="dsChar"/>
			<itemData name="Variable"		defStyleNum="dsDataType"/>
			<itemData name="Section"		defStyleNum="dsOthers"/>
			<itemData name="Operator"		defStyleNum="dsChar"/>
		</itemDatas>
	</highlighting>

	<general>
		<comments>
			<comment name = "singleLine" start = "#"/>
		</comments>
		<keywords casesensitive = "1" />
	</general>
</language>