This file is indexed.

/usr/share/gtksourceview-2.0/language-specs/cg.lang is in libgtksourceview2.0-common 2.10.5-2ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?xml version="1.0" encoding="UTF-8"?>
<!--

 Authors: Jesse van den Kieboom <jessevdk@gnome.org>
 Copyright (C) 2010 Jesse van den Kieboom <jessevdk@gnome.org>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Library General Public
 License as published by the Free Software Foundation; either
 version 2 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Library General Public License for more details.

 You should have received a copy of the GNU Library General Public
 License along with this library; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.

-->
<language id="cg" _name="CG Shader Language" version="2.0" _section="Sources">
    <metadata>
      <property name="globs">*.cg</property>
      <property name="line-comment-start">//</property>
      <property name="block-comment-start">/*</property>
      <property name="block-comment-end">*/</property>
    </metadata>

    <styles>
        <style id="comment"           _name="Comment"             map-to="def:comment"/>
        <style id="error"             _name="Error"               map-to="def:error"/>
        <style id="preprocessor"      _name="Preprocessor"        map-to="def:preprocessor"/>
        <style id="bindings"          _name="Bindings"            map-to="def:special-constant"/>
        <style id="included-file"     _name="Included File"       map-to="def:string"/>
        <style id="keyword"           _name="Keyword"             map-to="def:keyword"/>
        <style id="type"              _name="Data Type"           map-to="def:type"/>
        <style id="storage-class"     _name="Storage Class"       map-to="def:builtin"/>
        <style id="escaped-character" _name="Escaped Character"   map-to="def:special-char"/>
        <style id="floating-point"    _name="Floating point number" map-to="def:floating-point"/>
        <style id="decimal"           _name="Decimal number"      map-to="def:decimal"/>
        <style id="octal"             _name="Octal number"        map-to="def:base-n-integer"/>
        <style id="hexadecimal"       _name="Hexadecimal number"  map-to="def:base-n-integer"/>
        <style id="boolean"           _name="Boolean value"       map-to="def:boolean"/>
        <style id="swizzle"           _name="Swizzle operator"    map-to="def:operator"/>
        <style id="function"          _name="Function"            map-to="def:function"/>
        <style id="builtin"           _name="Builtin"             map-to="def:preprocessor"/>
    </styles>

    <definitions>
        <!-- http://en.wikipedia.org/wiki/C_syntax#Strings -->
        <define-regex id="escaped-character" extended="true">
            \\(                   # leading backslash
            [\\\"\'nrtfav\?e] |   # escaped character
            [0-7]{1,3} |          # one, two, or three octal digits
            x[0-9A-Fa-f]{0,2}     # 'x' followed by zero, one, or two hex digits
            )
        </define-regex>

        <context id="cg" class="no-spell-check">
            <include>
                <!-- Comments -->
                <context id="comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
                    <start>//</start>
                    <include>
                      <context ref="def:in-line-comment"/>
                    </include>
                </context>

                <context id="comment-multiline" style-ref="comment" class="comment" class-disabled="no-spell-check">
                    <start>/\*</start>
                    <end>\*/</end>
                    <include>
                        <context ref="def:in-comment"/>
                    </include>
                </context>

                <context id="close-comment-outside-comment" style-ref="error">
                    <match>\*/(?!\*)</match>
                </context>

                <!-- Preprocessor -->
                <define-regex id="preproc-start">^\s*#\s*</define-regex>

                <context id="include" style-ref="preprocessor">
                    <match extended="true">
                            \%{preproc-start}
                            (include|import)\s*
                            (".*?"|&lt;.*&gt;)
                    </match>
                    <include>
                        <context id="included-file" sub-pattern="2" style-ref="included-file"/>
                    </include>
                </context>

                <!-- http://www.lysator.liu.se/c/ANSI-C-grammar-l.html -->
                <context id="float" style-ref="floating-point">
                    <match extended="true">
                        (?&lt;![\w\.])
                        ((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? |
                         ([0-9]+[Ee][+-]?[0-9]*))
                        [fFlL]?
                        (?![\w\.])
                    </match>
                </context>

                <context id="hexadecimal" style-ref="hexadecimal">
                    <match extended="true">
                        (?&lt;![\w\.])
                        0[xX][a-fA-F0-9]+[uUlL]*
                        (?![\w\.])
                    </match>
                </context>

                <context id="octal" style-ref="octal">
                    <match extended="true">
                        (?&lt;![\w\.])
                        0[0-7]+[uUlL]*
                        (?![\w\.])
                    </match>
                </context>

                <context id="decimal" style-ref="decimal">
                    <match extended="true">
                        (?&lt;![\w\.])
                        [0-9]+[uUlL]*
                        (?![\w\.])
                    </match>
                </context>

                <!-- Keywords -->
                <context id="keywords" style-ref="keyword">
                    <keyword>break</keyword>
                    <keyword>case</keyword>
                    <keyword>continue</keyword>
                    <keyword>default</keyword>
                    <keyword>else</keyword>
                    <keyword>for</keyword>
                    <keyword>if</keyword>
                    <keyword>return</keyword>
                    <keyword>struct</keyword>
                    <keyword>switch</keyword>
                    <keyword>while</keyword>
                </context>

                <context id="types" style-ref="type">
                    <keyword>bool</keyword>
                    <keyword>float</keyword>
                    <keyword>float2</keyword>
                    <keyword>float3</keyword>
                    <keyword>float4</keyword>
                    <keyword>float2x2</keyword>
                    <keyword>float3x3</keyword>
                    <keyword>float4x4</keyword>
                    <keyword>int</keyword>
                    <keyword>half</keyword>
                    <keyword>fixed</keyword>
                    <keyword>void</keyword>
                    <keyword>sampler1D</keyword>
                    <keyword>sampler2D</keyword>
                    <keyword>sampler3D</keyword>
                    <keyword>samplerRECT</keyword>
                    <keyword>samplerCUBE</keyword>
                </context>

                <context id="storage-class" style-ref="storage-class">
                    <keyword>uniform</keyword>
                    <keyword>out</keyword>
                    <keyword>inout</keyword>
                    <keyword>in</keyword>
                    <keyword>varying</keyword>
                </context>

                <context id="bindings" style-ref="bindings">
                    <keyword>POSITION</keyword>
                    <keyword>NORMAL</keyword>
                </context>
                
                <context id="color-bindings" style-ref="bindings">
                    <match extended="true">COLOR[0-3]?</match>
                </context>

                <context id="texunit-bindings" style-ref="bindings">
                    <match extended="true">TEXUNIT([0-9]|1[0-5])?</match>
                </context>
                 
                <context id="texcoord-bindings" style-ref="bindings">
                    <match extended="true">TEXCOORD[0-7]?</match>
                </context>
                 
                <context id="swizzle">
                    <match extended="true">\.([xyzw]+|[rgba]+)</match>
                    <include>
                        <context id="swizzle-operator" sub-pattern="1" style-ref="swizzle"/>
                    </include>
                </context>
                 
                <!-- C99 booleans -->                
                <context id="boolean" style-ref="boolean">
                    <keyword>true</keyword>
                    <keyword>false</keyword>
                </context>
                
                <context id="builtin">
                    <match extended="true">
                        (mul|lit|lerp|saturate|abs|cos|acos|sin|asin|tan|atan|all|any|ceil|clamp|
                        cosh|cross|degress|determinant|dot|exp|exp2|floor|fmod|frac|frexp|isfinite|
                        isinf|isnan|ldexp|log|log2|log10|max|min|modf|noise|pow|radians|round|
                        rsqrt|sign|sincos|sinh|smoothstep|step|sqrt|tanh|transpose|distance|
                        faceforward|length|normalize|reflect|refract|tex1D|tex2D|tex3D|
                        tex1Dproj|tex2Dproj|tex3Dproj|texRECT|texRECTproj|texCUBE|texCUBEproj|
                        ddx|ddy|debug)\s*\(
                    </match>
                    <include>
                        <context id="builtin-name" sub-pattern="1" style-ref="builtin"/>
                    </include>
                </context>
                
                <context id="function">
                    <match extended="true">
                        ([a-zA-Z_][a-zA-Z_0-9]*)\s*\(
                    </match>
                    <include>
                        <context id="function-name" sub-pattern="1" style-ref="function"/>
                    </include>
                </context>
            </include>
        </context>
    </definitions>
</language>