-
Notifications
You must be signed in to change notification settings - Fork 0
/
spss.xml
154 lines (136 loc) · 6.22 KB
/
spss.xml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- Kate 2.5 highlighting module for PSPP
based on same file for R by E.L. Willighagen, Ben Goodrich, Thomas Friedrichsmeier, Arne Henningsen
version 0.1: (c) 2010 Marcelo Escobal
license: GPL v2
Kate : http://kate.kde.org/
-->
<language version="2.01" kateversion="2.5" name="PSPP Script" section="Scripts" extensions="*.syn;*.sps" mimetype="" license="GPL">
<highlighting>
<list name="controls">
<item> and </item>
<item> by </item>
<item> compute </item>
<item> crosstabs </item>
<item> descriptives </item>
<item> echo </item>
<item> filter</item>
<item> frequencies </item>
<item> get </item>
<item> if </item>
<item> into </item>
<item> labels </item>
<item> off </item>
<item> recode </item>
<item> save </item>
<item> select </item>
<item> set </item>
<item> string </item>
<item> t-test </item>
<item> thru </item>
<item> value </item>
</list>
<list name="commands">
<item> chisq </item>
<item> column </item>
<item> comma </item>
<item> count </item>
<item> include </item>
<item> paired </item>
<item> row </item>
<item> total </item>
</list>
<list name="words">
<item> cells </item>
<item> decimal </item>
<item> file </item>
<item> format </item>
<item> missing </item>
<item> pairs </item>
<item> outfile </item>
<item> statistics </item>
<item> tables </item>
<item> variables </item>
</list>
<contexts>
<!-- This context is really only good for detecting unexpected closing braces '}'. Since opening braces go to ctx0 (and nesting in there), this context is only active on the base level -->
<context attribute="Normal Text" lineEndContext="#stay" name="level0">
<IncludeRules context="CommonRules"/>
<DetectChar attribute="Error" context="#stay" char="}" />
<DetectChar attribute="Error" context="#stay" char=")"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="ctx0">
<IncludeRules context="CommonRules"/>
<DetectChar attribute="Symbol" context="#pop" char="}" endRegion="Brace1" />
<DetectChar attribute="Error" context="#stay" char=")"/>
</context>
<context attribute="In Parenthesis" lineEndContext="#stay" name="parenthesis">
<LineContinue attribute="Boolean" context="#stay"/>
<DetectChar attribute="Keyword" context="#pop" char=")"/>
<RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_\.][0-9a-zA-Z_\.]*[\s]*=(?=([^=]|$))"/>
<IncludeRules context="CommonRules"/>
<DetectChar attribute="Error" context="#stay" char="}" />
</context>
<context attribute="String" lineEndContext="#stay" name="string">
<DetectChar attribute="String" context="#pop" char="""/>
<DetectChar attribute="String" context="#pop" char="'"/>
<HlCStringChar attribute="String Char" context="#stay"/>
</context>
<context attribute="Identifier" lineEndContext="#stay" name="backquotedsymbol">
<DetectChar attribute="String" context="#pop" char="`"/>
<HlCStringChar attribute="String Char" context="#stay"/>
</context>
<context attribute="Comment" lineEndContext="#pop" name="Comment"/>
<!-- This context is not really used, but contains the common rules -->
<context name="CommonRules" lineEndContext="#stay" attribute="Normal Text" >
<DetectChar attribute="String" context="string" char="""/>
<DetectChar attribute="String" context="string" char="'"/>
<DetectChar attribute="String" context="backquotedsymbol" char="`"/>
<keyword attribute="Control Structure" context="#stay" String="controls"/>
<keyword attribute="Reserved Words" context="#stay" String="words"/>
<keyword attribute="Especificadores" context="#stay" String="commands"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Int" context="#stay"/>
<RegExpr attribute="Keyword" context="#stay" String="[a-zA-Z_]+[a-zA-Z_\.0-9]*(?=[\s]*[(])"/>
<RegExpr attribute="Keyword" context="#stay" String="\.[a-zA-Z_\.]+[a-zA-Z_\.0-9]*(?=[\s]*[(])"/>
<RegExpr attribute="Keyword" context="parenthesis" String="\("/>
<DetectChar attribute="Comment" context="Comment" char="*"/>
<RegExpr attribute="Assign" context="#stay" String="[<]{1,2}\-"/>
<RegExpr attribute="Assign" context="#stay" String="\-[>]{1,2}"/>
<!-- Much like above: Most other operators are forbidden around = -->
<RegExpr attribute="Assign" context="#stay" String="=(?!=)"/>
<!-- These operators are fine as long as they're followed by something else or end of line. Error otherwise -->
<RegExpr attribute="Operator" context="#stay" String="(\+|\-|\*|/|<=|>=|={1,2}|\!=|\|{1,2}|&{1,2}|:{1,2}|\^|@|\$|~)((?!(\+|\-|\*|/|<=|>=|=|\!=|\||&|:|\^|@|\$|~))|$)"/>
<RegExpr attribute="Operator" context="#stay" String="%[^%]*%"/>
<DetectChar attribute="Symbol" context="ctx0" char="{" beginRegion="Brace1" />
</context>
</contexts>
<itemDatas>
<!-- KDE default colors: http://accessibility.kde.org/oxygen.php?color=white -->
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Symbol" defStyleNum="dsNormal"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Identifier" defStyleNum="dsDataType"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Assign" defStyleNum="dsNormal" color="#336366" selColor="#ccc099" bold="1" italic="0"/> <!-- KDE default color: text 7 -->
<itemData name="Control Structure" defStyleNum="dsNormal" color="#0000bf" selColor="#bfbf00"/> <!-- KDE
default color: text 2 -->
<itemData name="Especificadores" defStyleNum="dsNormal" color="#aa0000" selColor="#bfbf00"/>
<itemData name="Reserved Words" defStyleNum="dsOthers"/>
<itemData name="Error" defStyleNum="dsError"/>
<itemData name="Operator" defStyleNum="dsNormal" color="#803f00" selColor="#000077" bold="0" italic="0"/> <!-- KDE default color: focussed text -->
<itemData name="String Char" defStyleNum="dsChar"/>
<itemData name="Float" defStyleNum="dsFloat"/>
<itemData name="Int" defStyleNum="dsDecVal"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="*" />
<comment name="multiLine" start="/*" end="*/" />
</comments>
<keywords casesensitive="0" />
</general>
</language>