Ticket #3683: initial support of GLSL syntax highlighting.
[midnight-commander.git] / misc / syntax / glsl.syntax
blobe1a317fa93cb0f9fbd79fa6917393604452ff8c7
1 # GLSL syntax file
3 # Authors:
4 #    Sergey Sharybin <sergey.vfx@gmail.com>
6 # Based on glsl-mode.el from
7 #    Xavier.Decoret@imag.fr
8 #    Jim Hourihan <jimhourihan ~at~ gmail.com>
10 context default
12 # Types
14     keyword whole float yellow
15     keyword whole double yellow
16     keyword whole int yellow
17     keyword whole void yellow
18     keyword whole bool yellow
19     keyword whole true yellow
20     keyword whole false yellow
21     keyword whole mat2 yellow
22     keyword whole mat3 yellow
23     keyword whole mat4 yellow
24     keyword whole dmat2 yellow
25     keyword whole dmat3 yellow
26     keyword whole dmat4 yellow
27     keyword whole mat2x2 yellow
28     keyword whole mat2x3 yellow
29     keyword whole mat2x4 yellow
30     keyword whole dmat2x2 yellow
31     keyword whole dmat2x3 yellow
32     keyword whole dmat2x4 yellow
33     keyword whole mat3x2 yellow
34     keyword whole mat3x3 yellow
35     keyword whole mat3x4 yellow
36     keyword whole dmat3x2 yellow
37     keyword whole dmat3x3 yellow
38     keyword whole dmat3x4 yellow
39     keyword whole mat4x2 yellow
40     keyword whole mat4x3 yellow
41     keyword whole mat4x4 yellow
42     keyword whole dmat4x2 yellow
43     keyword whole dmat4x3 yellow
44     keyword whole dmat4x4 yellow
45     keyword whole vec2 yellow
46     keyword whole vec3 yellow
47     keyword whole vec4 yellow
48     keyword whole ivec2 yellow
49     keyword whole ivec3 yellow
50     keyword whole ivec4 yellow
51     keyword whole bvec2 yellow
52     keyword whole bvec3 yellow
53     keyword whole bvec4 yellow
54     keyword whole dvec2 yellow
55     keyword whole dvec3 yellow
56     keyword whole dvec4 yellow
57     keyword whole uint yellow
58     keyword whole uvec2 yellow
59     keyword whole uvec3 yellow
60     keyword whole uvec4 yellow
61     keyword whole sampler1D yellow
62     keyword whole sampler2D yellow
63     keyword whole sampler3D yellow
64     keyword whole samplerCube yellow
65     keyword whole sampler1DShadow yellow
66     keyword whole sampler2DShadow yellow
67     keyword whole samplerCubeShadow yellow
68     keyword whole sampler1DArray yellow
69     keyword whole sampler2DArray yellow
70     keyword whole sampler1DArrayShadow yellow
71     keyword whole sampler2DArrayShadow yellow
72     keyword whole isampler1D yellow
73     keyword whole isampler2D yellow
74     keyword whole isampler3D yellow
75     keyword whole isamplerCube yellow
76     keyword whole isampler1DArray yellow
77     keyword whole isampler2DArray yellow
78     keyword whole usampler1D yellow
79     keyword whole usampler2D yellow
80     keyword whole usampler3D yellow
81     keyword whole usamplerCube yellow
82     keyword whole usampler1DArray yellow
83     keyword whole usampler2DArray yellow
84     keyword whole sampler2DRect yellow
85     keyword whole sampler2DRectShadow yellow
86     keyword whole isampler2DRect yellow
87     keyword whole usampler2DRect yellow
88     keyword whole samplerBuffer yellow
89     keyword whole isamplerBuffer yellow
90     keyword whole usamplerBuffer yellow
91     keyword whole sampler2DMS yellow
92     keyword whole isampler2DMS yellow
93     keyword whole usampler2DMS yellow
94     keyword whole sampler2DMSArray yellow
95     keyword whole isampler2DMSArray yellow
96     keyword whole usampler2DMSArray yellow
97     keyword whole samplerCubeArray yellow
98     keyword whole samplerCubeArrayShadow yellow
99     keyword whole isamplerCubeArray yellow
100     keyword whole usamplerCubeArray yellow
101     keyword whole image1D yellow
102     keyword whole iimage1D yellow
103     keyword whole uimage1D yellow
104     keyword whole image2D yellow
105     keyword whole iimage2D yellow
106     keyword whole uimage2D yellow
107     keyword whole image3D yellow
108     keyword whole iimage3D yellow
109     keyword whole uimage3D yellow
110     keyword whole image2DRect yellow
111     keyword whole iimage2DRect yellow
112     keyword whole uimage2DRect yellow
113     keyword whole imageCube yellow
114     keyword whole iimageCube yellow
115     keyword whole uimageCube yellow
116     keyword whole imageBuffer yellow
117     keyword whole iimageBuffer yellow
118     keyword whole uimageBuffer yellow
119     keyword whole image1DArray yellow
120     keyword whole iimage1DArray yellow
121     keyword whole uimage1DArray yellow
122     keyword whole image2DArray yellow
123     keyword whole iimage2DArray yellow
124     keyword whole uimage2DArray yellow
125     keyword whole imageCubeArray yellow
126     keyword whole iimageCubeArray yellow
127     keyword whole uimageCubeArray yellow
128     keyword whole image2DMS yellow
129     keyword whole iimage2DMS yellow
130     keyword whole uimage2DMS yellow
131     keyword whole image2DMSArray yellow
132     keyword whole iimage2DMSArray yellow
133     keyword whole uimage2DMSArray yellow
134     keyword whole long yellow
135     keyword whole short yellow
136     keyword whole half yellow
137     keyword whole fixed yellow
138     keyword whole unsigned yellow
139     keyword whole hvec2 yellow
140     keyword whole hvec3 yellow
141     keyword whole hvec4 yellow
142     keyword whole fvec2 yellow
143     keyword whole fvec3 yellow
144     keyword whole fvec4 yellow
145     keyword whole sampler3DRect yellow
147 # Modifiers
149     keyword whole attribute yellow
150     keyword whole const yellow
151     keyword whole uniform yellow
152     keyword whole varying yellow
153     keyword whole buffer yellow
154     keyword whole shared yellow
155     keyword whole coherent yellow
156     keyword whole volatile yellow
157     keyword whole restrict yellow
158     keyword whole readonly yellow
159     keyword whole writeonly yellow
160     keyword whole atomic_uint yellow
161     keyword whole layout yellow
162     keyword whole centroid yellow
163     keyword whole flat yellow
164     keyword whole smooth yellow
165     keyword whole noperspective yellow
166     keyword whole patch yellow
167     keyword whole sample yellow
168     keyword whole break yellow
169     keyword whole continue yellow
170     keyword whole do yellow
171     keyword whole for yellow
172     keyword whole while yellow
173     keyword whole switch yellow
174     keyword whole case yellow
175     keyword whole default yellow
176     keyword whole if yellow
177     keyword whole else yellow
178     keyword whole subroutine yellow
179     keyword whole in yellow
180     keyword whole out yellow
181     keyword whole inout yellow
182     keyword whole invariant yellow
183     keyword whole discard yellow
184     keyword whole return yellow
185     keyword whole lowp yellow
186     keyword whole mediump yellow
187     keyword whole highp yellow
188     keyword whole precision yellow
189     keyword whole struct yellow
190     keyword whole common yellow
191     keyword whole partition yellow
192     keyword whole active yellow
193     keyword whole asm yellow
194     keyword whole class yellow
195     keyword whole union yellow
196     keyword whole enum yellow
197     keyword whole typedef yellow
198     keyword whole template yellow
199     keyword whole this yellow
200     keyword whole packed yellow
201     keyword whole resource yellow
202     keyword whole goto yellow
203     keyword whole inline yellow
204     keyword whole noinline yellow
205     keyword whole public yellow
206     keyword whole static yellow
207     keyword whole extern yellow
208     keyword whole external yellow
209     keyword whole interface yellow
210     keyword whole superp yellow
211     keyword whole input yellow
212     keyword whole output yellow
213     keyword whole filter yellow
214     keyword whole sizeof yellow
215     keyword whole cast yellow
216     keyword whole namespace yellow
217     keyword whole using yellow
218     keyword whole row major yellow
219     keyword whole early_fragment_tests yellow
221 # Deprecated
222     keyword whole varying brightred
223     keyword whole attribute brightred
225 # Built-in
226     keyword whole abs brightmagenta
227     keyword whole acos brightmagenta
228     keyword whole acosh brightmagenta
229     keyword whole all brightmagenta
230     keyword whole any brightmagenta
231     keyword whole asin brightmagenta
232     keyword whole asinh brightmagenta
233     keyword whole atan brightmagenta
234     keyword whole atanh brightmagenta
235     keyword whole atomicCounter brightmagenta
236     keyword whole atomicCounterDecrement brightmagenta
237     keyword whole atomicCounterIncrement brightmagenta
238     keyword whole barrier brightmagenta
239     keyword whole bitCount brightmagenta
240     keyword whole bitfieldExtract brightmagenta
241     keyword whole bitfieldInsert brightmagenta
242     keyword whole bitfieldReverse brightmagenta
243     keyword whole ceil brightmagenta
244     keyword whole clamp brightmagenta
245     keyword whole cos brightmagenta
246     keyword whole cosh brightmagenta
247     keyword whole cross brightmagenta
248     keyword whole degrees brightmagenta
249     keyword whole determinant brightmagenta
250     keyword whole dFdx brightmagenta
251     keyword whole dFdy brightmagenta
252     keyword whole dFdyFine brightmagenta
253     keyword whole dFdxFine brightmagenta
254     keyword whole dFdyCoarse brightmagenta
255     keyword whole dFdxCourse brightmagenta
256     keyword whole fwidthFine brightmagenta
257     keyword whole fwidthCoarse brightmagenta
258     keyword whole distance brightmagenta
259     keyword whole dot brightmagenta
260     keyword whole EmitStreamVertex brightmagenta
261     keyword whole EmitVertex brightmagenta
262     keyword whole EndPrimitive brightmagenta
263     keyword whole EndStreamPrimitive brightmagenta
264     keyword whole equal brightmagenta
265     keyword whole exp brightmagenta
266     keyword whole exp2 brightmagenta
267     keyword whole faceforward brightmagenta
268     keyword whole findLSB brightmagenta
269     keyword whole findMSB brightmagenta
270     keyword whole floatBitsToInt brightmagenta
271     keyword whole floatBitsToUint brightmagenta
272     keyword whole floor brightmagenta
273     keyword whole fma brightmagenta
274     keyword whole fract brightmagenta
275     keyword whole frexp brightmagenta
276     keyword whole fwidth brightmagenta
277     keyword whole greaterThan brightmagenta
278     keyword whole greaterThanEqual brightmagenta
279     keyword whole imageAtomicAdd brightmagenta
280     keyword whole imageAtomicAnd brightmagenta
281     keyword whole imageAtomicCompSwap brightmagenta
282     keyword whole imageAtomicExchange brightmagenta
283     keyword whole imageAtomicMax brightmagenta
284     keyword whole imageAtomicMin brightmagenta
285     keyword whole imageAtomicOr brightmagenta
286     keyword whole imageAtomicXor brightmagenta
287     keyword whole imageLoad brightmagenta
288     keyword whole imageSize brightmagenta
289     keyword whole imageStore brightmagenta
290     keyword whole imulExtended brightmagenta
291     keyword whole intBitsToFloat brightmagenta
292     keyword whole imageSamples brightmagenta
293     keyword whole interpolateAtCentroid brightmagenta
294     keyword whole interpolateAtOffset brightmagenta
295     keyword whole interpolateAtSample brightmagenta
296     keyword whole inverse brightmagenta
297     keyword whole inversesqrt brightmagenta
298     keyword whole isinf brightmagenta
299     keyword whole isnan brightmagenta
300     keyword whole ldexp brightmagenta
301     keyword whole length brightmagenta
302     keyword whole lessThan brightmagenta
303     keyword whole lessThanEqual brightmagenta
304     keyword whole log brightmagenta
305     keyword whole log2 brightmagenta
306     keyword whole matrixCompMult brightmagenta
307     keyword whole max brightmagenta
308     keyword whole memoryBarrier brightmagenta
309     keyword whole min brightmagenta
310     keyword whole mix brightmagenta
311     keyword whole mod brightmagenta
312     keyword whole modf brightmagenta
313     keyword whole noise brightmagenta
314     keyword whole normalize brightmagenta
315     keyword whole not brightmagenta
316     keyword whole notEqual brightmagenta
317     keyword whole outerProduct brightmagenta
318     keyword whole packDouble2x32 brightmagenta
319     keyword whole packHalf2x16 brightmagenta
320     keyword whole packSnorm2x16 brightmagenta
321     keyword whole packSnorm4x8 brightmagenta
322     keyword whole packUnorm2x16 brightmagenta
323     keyword whole packUnorm4x8 brightmagenta
324     keyword whole pow brightmagenta
325     keyword whole radians brightmagenta
326     keyword whole reflect brightmagenta
327     keyword whole refract brightmagenta
328     keyword whole round brightmagenta
329     keyword whole roundEven brightmagenta
330     keyword whole sign brightmagenta
331     keyword whole sin brightmagenta
332     keyword whole sinh brightmagenta
333     keyword whole smoothstep brightmagenta
334     keyword whole sqrt brightmagenta
335     keyword whole step brightmagenta
336     keyword whole tan brightmagenta
337     keyword whole tanh brightmagenta
338     keyword whole texelFetch brightmagenta
339     keyword whole texelFetchOffset brightmagenta
340     keyword whole texture brightmagenta
341     keyword whole textureGather brightmagenta
342     keyword whole textureGatherOffset brightmagenta
343     keyword whole textureGatherOffsets brightmagenta
344     keyword whole textureGrad brightmagenta
345     keyword whole textureGradOffset brightmagenta
346     keyword whole textureLod brightmagenta
347     keyword whole textureLodOffset brightmagenta
348     keyword whole textureOffset brightmagenta
349     keyword whole textureProj brightmagenta
350     keyword whole textureProjGrad brightmagenta
351     keyword whole textureProjGradOffset brightmagenta
352     keyword whole textureProjLod brightmagenta
353     keyword whole textureProjLodOffset brightmagenta
354     keyword whole textureProjOffset brightmagenta
355     keyword whole textureQueryLevels brightmagenta
356     keyword whole textureQueryLod brightmagenta
357     keyword whole textureSize brightmagenta
358     keyword whole transpose brightmagenta
359     keyword whole trunc brightmagenta
360     keyword whole uaddCarry brightmagenta
361     keyword whole uintBitsToFloat brightmagenta
362     keyword whole umulExtended brightmagenta
363     keyword whole unpackDouble2x32 brightmagenta
364     keyword whole unpackHalf2x16 brightmagenta
365     keyword whole unpackSnorm2x16 brightmagenta
366     keyword whole unpackSnorm4x8 brightmagenta
367     keyword whole unpackUnorm2x16 brightmagenta
368     keyword whole unpackUnorm4x8 brightmagenta
369     keyword whole usubBorrow brightmagenta
371 # Deprecated built-in
372     keyword whole texture1D magenta
373     keyword whole texture1DProj magenta
374     keyword whole texture1DLod magenta
375     keyword whole texture1DProjLod magenta
376     keyword whole texture2D magenta
377     keyword whole texture2DProj magenta
378     keyword whole texture2DLod magenta
379     keyword whole texture2DProjLod magenta
380     keyword whole texture2DRect magenta
381     keyword whole texture2DRectProj magenta
382     keyword whole texture3D magenta
383     keyword whole texture3DProj magenta
384     keyword whole texture3DLod magenta
385     keyword whole texture3DProjLod magenta
386     keyword whole shadow1D magenta
387     keyword whole shadow1DProj magenta
388     keyword whole shadow1DLod magenta
389     keyword whole shadow1DProjLod magenta
390     keyword whole shadow2D magenta
391     keyword whole shadow2DProj magenta
392     keyword whole shadow2DLod magenta
393     keyword whole shadow2DProjLod magenta
394     keyword whole textureCube magenta
395     keyword whole textureCubeLod magenta
397 # Deprecated variables
399     keyword whole gl_FragColor red
400     keyword whole gl_FragData red
401     keyword whole gl_MaxVarying red
402     keyword whole gl_MaxVaryingFloats red
403     keyword whole gl_MaxVaryingComponents red
405 # Comments
406     keyword /\* brown
407     keyword \*/ brown
408     keyword // brown
410 # Preprocessor
411     keyword # brightred
413 # Punctuation
414     keyword > white
415     keyword < white
416     keyword \+ white
417     keyword - white
418     keyword \* white
419     keyword / white
420     keyword % white
421     keyword = white
422     keyword != white
423     keyword == white
424     keyword & white
425     keyword | white
426     keyword :: white
427     keyword -> white
428     keyword { brightcyan
429     keyword } brightcyan
430     keyword ( brightcyan
431     keyword ) brightcyan
432     keyword [ brightcyan
433     keyword ] brightcyan
434     keyword , brightcyan
435     keyword : brightcyan
436     keyword ; brightmagenta
438 context exclusive # \n brightred
439     keyword \\\n yellow
440     keyword /\**\*/ brown
441     keyword //*\n brown
442     keyword "+" red
443     keyword <+> red
444 context exclusive /\* \*/ brown
445     spellcheck
446 context exclusive // \n brown
447     spellcheck
449 context " " green
450     spellcheck
451 context ' ' brightgreen
452     spellcheck