summaryrefslogtreecommitdiffstats
path: root/misc/syntax/osl.syntax
blob: e8607c03f1d9ea8a8b1fabd08eb8b3a4a2d6332f (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
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
# Syntax rules for the C and the C++ programming languages
#
# List of keywords is based on opencl-mode.el from
# Salmane Bah <salmane.bah@u-bordeaux.fr>

context default
# Keywords
    keyword whole break yellow
    keyword whole closure yellow
    keyword whole color yellow
    keyword whole continue yellow
    keyword whole do yellow
    keyword whole else yellow
    keyword whole float yellow
    keyword whole for yellow
    keyword whole if yellow
    keyword whole illuminance yellow
    keyword whole illuminate yellow
    keyword whole int yellow
    keyword whole matrix yellow
    keyword whole normal yellow
    keyword whole output yellow
    keyword whole point yellow
    keyword whole public yellow
    keyword whole return yellow
    keyword whole string yellow
    keyword whole struct yellow
    keyword whole vector yellow
    keyword whole void yellow
    keyword whole while yellow
    keyword whole or yellow
    keyword whole and yellow
    keyword whole not yellow
    keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta

# Reserved words
    keyword whole bool red
    keyword whole case red
    keyword whole char red
    keyword whole class red
    keyword whole const red
    keyword whole default red
    keyword whole double red
    keyword whole enum red
    keyword whole extern red
    keyword whole false red
    keyword whole friend red
    keyword whole inline red
    keyword whole long red
    keyword whole private red
    keyword whole protected red
    keyword whole short red
    keyword whole signed red
    keyword whole sizeof red
    keyword whole static red
    keyword whole struct red
    keyword whole switch red
    keyword whole template red
    keyword whole this red
    keyword whole true red
    keyword whole typedef red
    keyword whole uniform red
    keyword whole union red
    keyword whole unsigned red
    keyword whole varying red
    keyword whole virtual red

# Shader types
    keyword whole shader white
    keyword whole surface white
    keyword whole displacement white
    keyword whole volume white

    keyword /\* brown
    keyword \*/ brown
    keyword // brown

    keyword '\\\{"abtnvfr\}' brightgreen
    keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
    keyword '\\'' brightgreen
    keyword '\\\\' brightgreen
    keyword '\\0' brightgreen
    keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~������������������������������������������������������������������������������������������������\}' brightgreen

# punctuation characters, sorted by ASCII code
    keyword ! yellow
    keyword % yellow
    keyword && yellow
    keyword & brightmagenta
    keyword ( brightcyan
    keyword ) brightcyan
    keyword \* yellow
    keyword \+ yellow
    keyword , brightcyan
    keyword - yellow
    keyword / yellow
    keyword : brightcyan
    keyword ; brightmagenta
    keyword < yellow
    keyword = yellow
    keyword > yellow
    keyword ? brightcyan
    keyword [ brightcyan
    keyword ] brightcyan
    keyword ^ brightmagenta
    keyword { brightcyan
    keyword || yellow
    keyword | brightmagenta
    keyword } brightcyan
    keyword ~ brightmagenta

context exclusive /\* \*/ brown
    spellcheck

context exclusive // \n brown
    spellcheck

context linestart # \n brightred
    keyword \\\n yellow
    keyword /\**\*/ brown
    keyword //*\n brown
    keyword "+" red
    keyword <+> red

context " " green
    spellcheck
    keyword \\" brightgreen
    keyword %% brightgreen
    keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
    keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
    keyword %\[hl\]n brightgreen
    keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
    keyword %[*] brightgreen
    keyword %c brightgreen
    keyword %p brightgreen
    keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
    keyword \\\\ brightgreen
    keyword \\' brightgreen
    keyword \\\{abtnvfr\} brightgreen