1 | <?php
|
---|
2 | /*************************************************************************************
|
---|
3 | * glsl.php
|
---|
4 | * -----
|
---|
5 | * Author: Benny Baumann ([email protected])
|
---|
6 | * Copyright: (c) 2008 Benny Baumann ([email protected])
|
---|
7 | * Release Version: 1.0.8.8
|
---|
8 | * Date Started: 2008/03/20
|
---|
9 | *
|
---|
10 | * glSlang language file for GeSHi.
|
---|
11 | *
|
---|
12 | * CHANGES
|
---|
13 | * -------
|
---|
14 | * 2008/03/20 (1.0.7.21)
|
---|
15 | * - First Release
|
---|
16 | *
|
---|
17 | * TODO
|
---|
18 | * ----
|
---|
19 | *
|
---|
20 | *************************************************************************************
|
---|
21 | *
|
---|
22 | * This file is part of GeSHi.
|
---|
23 | *
|
---|
24 | * GeSHi is free software; you can redistribute it and/or modify
|
---|
25 | * it under the terms of the GNU General Public License as published by
|
---|
26 | * the Free Software Foundation; either version 2 of the License, or
|
---|
27 | * (at your option) any later version.
|
---|
28 | *
|
---|
29 | * GeSHi is distributed in the hope that it will be useful,
|
---|
30 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
31 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
32 | * GNU General Public License for more details.
|
---|
33 | *
|
---|
34 | * You should have received a copy of the GNU General Public License
|
---|
35 | * along with GeSHi; if not, write to the Free Software
|
---|
36 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
37 | *
|
---|
38 | ************************************************************************************/
|
---|
39 |
|
---|
40 | $language_data = array (
|
---|
41 | 'LANG_NAME' => 'glSlang',
|
---|
42 | 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
|
---|
43 | 'COMMENT_MULTI' => array('/*' => '*/'),
|
---|
44 | 'COMMENT_REGEXP' => array(
|
---|
45 | //Multiline-continued single-line comments
|
---|
46 | 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
|
---|
47 | //Multiline-continued preprocessor define
|
---|
48 | 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m'
|
---|
49 | ),
|
---|
50 | 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
|
---|
51 | 'QUOTEMARKS' => array("'", '"'),
|
---|
52 | 'ESCAPE_CHAR' => '\\',
|
---|
53 | 'KEYWORDS' => array(
|
---|
54 | 1 => array(
|
---|
55 | 'if', 'else', 'for', 'while', 'do', 'break', 'continue', 'asm',
|
---|
56 | 'switch', 'case', 'default', 'return', 'discard',
|
---|
57 | 'namespace', 'using', 'sizeof', 'cast'
|
---|
58 | ),
|
---|
59 | 2 => array(
|
---|
60 | 'const', 'uniform', 'attribute', 'centroid', 'varying', 'invariant',
|
---|
61 | 'in', 'out', 'inout', 'input', 'output', 'typedef', 'volatile',
|
---|
62 | 'public', 'static', 'extern', 'external', 'packed',
|
---|
63 | 'inline', 'noinline', 'noperspective', 'flat'
|
---|
64 | ),
|
---|
65 | 3 => array(
|
---|
66 | 'void', 'bool', 'int', 'long', 'short', 'float', 'half', 'fixed',
|
---|
67 | 'unsigned', 'lowp', 'mediump', 'highp', 'precision',
|
---|
68 | 'vec2', 'vec3', 'vec4', 'bvec2', 'bvec3', 'bvec4',
|
---|
69 | 'dvec2', 'dvec3', 'dvec4', 'fvec2', 'fvec3', 'fvec4',
|
---|
70 | 'hvec2', 'hvec3', 'hvec4', 'ivec2', 'ivec3', 'ivec4',
|
---|
71 | 'mat2', 'mat3', 'mat4', 'mat2x2', 'mat3x2', 'mat4x2',
|
---|
72 | 'mat2x3', 'mat3x3', 'mat4x3', 'mat2x4', 'mat3x4', 'mat4x4',
|
---|
73 | 'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube',
|
---|
74 | 'sampler1DShadow', 'sampler2DShadow',
|
---|
75 | 'struct', 'class', 'union', 'enum', 'interface', 'template'
|
---|
76 | ),
|
---|
77 | 4 => array(
|
---|
78 | 'this', 'false', 'true'
|
---|
79 | ),
|
---|
80 | 5 => array(
|
---|
81 | 'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan',
|
---|
82 | 'pow', 'exp2', 'log2', 'sqrt', 'inversesqrt', 'abs', 'sign', 'ceil',
|
---|
83 | 'floor', 'fract', 'mod', 'min', 'max', 'clamp', 'mix', 'step',
|
---|
84 | 'smoothstep', 'length', 'distance', 'dot', 'cross', 'normalize',
|
---|
85 | 'ftransform', 'faceforward', 'reflect', 'matrixCompMult', 'equal',
|
---|
86 | 'lessThan', 'lessThanEqual', 'greaterThan', 'greaterThanEqual',
|
---|
87 | 'notEqual', 'any', 'all', 'not', 'texture1D', 'texture1DProj',
|
---|
88 | 'texture1DLod', 'texture1DProjLod', 'texture2D', 'texture2DProj',
|
---|
89 | 'texture2DLod', 'texture2DProjLod', 'texture3D', 'texture3DProj',
|
---|
90 | 'texture3DLod', 'texture3DProjLod', 'textureCube', 'textureCubeLod',
|
---|
91 | 'shadow1D', 'shadow1DProj', 'shadow1DLod', 'shadow1DProjLod',
|
---|
92 | 'shadow2D', 'shadow2DProj', 'shadow2DLod', 'shadow2DProjLod',
|
---|
93 | 'noise1', 'noise2', 'noise3', 'noise4'
|
---|
94 | ),
|
---|
95 | 6 => array(
|
---|
96 | 'gl_Position', 'gl_PointSize', 'gl_ClipVertex', 'gl_FragColor',
|
---|
97 | 'gl_FragData', 'gl_FragDepth', 'gl_FragCoord', 'gl_FrontFacing',
|
---|
98 | 'gl_Color', 'gl_SecondaryColor', 'gl_Normal', 'gl_Vertex',
|
---|
99 | 'gl_MultiTexCoord0', 'gl_MultiTexCoord1', 'gl_MultiTexCoord2',
|
---|
100 | 'gl_MultiTexCoord3', 'gl_MultiTexCoord4', 'gl_MultiTexCoord5',
|
---|
101 | 'gl_MultiTexCoord6', 'gl_MultiTexCoord7', 'gl_FogCoord',
|
---|
102 | 'gl_MaxLights', 'gl_MaxClipPlanes', 'gl_MaxTextureUnits',
|
---|
103 | 'gl_MaxTextureCoords', 'gl_MaxVertexAttribs', 'gl_MaxVaryingFloats',
|
---|
104 | 'gl_MaxVertexUniformComponents', 'gl_MaxVertexTextureImageUnits',
|
---|
105 | 'gl_MaxCombinedTextureImageUnits', 'gl_MaxTextureImageUnits',
|
---|
106 | 'gl_MaxFragmentUniformComponents', 'gl_MaxDrawBuffers', 'gl_Point',
|
---|
107 | 'gl_ModelViewMatrix', 'gl_ProjectionMatrix', 'gl_FrontMaterial',
|
---|
108 | 'gl_ModelViewProjectionMatrix', 'gl_TextureMatrix', 'gl_ClipPlane',
|
---|
109 | 'gl_NormalMatrix', 'gl_ModelViewMatrixInverse', 'gl_BackMaterial',
|
---|
110 | 'gl_ProjectionMatrixInverse', 'gl_ModelViewProjectionMatrixInverse',
|
---|
111 | 'gl_TextureMatrixInverse', 'gl_ModelViewMatrixTranspose', 'gl_Fog',
|
---|
112 | 'gl_ProjectionMatrixTranspose', 'gl_NormalScale', 'gl_DepthRange',
|
---|
113 | 'gl_odelViewProjectionMatrixTranspose', 'gl_TextureMatrixTranspose',
|
---|
114 | 'gl_ModelViewMatrixInverseTranspose', 'gl_LightSource',
|
---|
115 | 'gl_ProjectionMatrixInverseTranspose', 'gl_LightModel',
|
---|
116 | 'gl_ModelViewProjectionMatrixInverseTranspose', 'gl_TexCoord',
|
---|
117 | 'gl_TextureMatrixInverseTranspose', 'gl_TextureEnvColor',
|
---|
118 | 'gl_FrontLightModelProduct', 'gl_BackLightModelProduct',
|
---|
119 | 'gl_FrontLightProduct', 'gl_BackLightProduct', 'gl_ObjectPlaneS',
|
---|
120 | 'gl_ObjectPlaneT', 'gl_ObjectPlaneR', 'gl_ObjectPlaneQ',
|
---|
121 | 'gl_EyePlaneS', 'gl_EyePlaneT', 'gl_EyePlaneR', 'gl_EyePlaneQ',
|
---|
122 | 'gl_FrontColor', 'gl_BackColor', 'gl_FrontSecondaryColor',
|
---|
123 | 'gl_BackSecondaryColor', 'gl_FogFragCoord', 'gl_PointCoord'
|
---|
124 | )
|
---|
125 | ),
|
---|
126 | 'SYMBOLS' => array(
|
---|
127 | '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^',
|
---|
128 | '&', '?', ':', '.', '|', ';', ',', '<', '>'
|
---|
129 | ),
|
---|
130 | 'CASE_SENSITIVE' => array(
|
---|
131 | GESHI_COMMENTS => false,
|
---|
132 | 1 => true,
|
---|
133 | 2 => true,
|
---|
134 | 3 => true,
|
---|
135 | 4 => true,
|
---|
136 | 5 => true,
|
---|
137 | 6 => true,
|
---|
138 | ),
|
---|
139 | 'STYLES' => array(
|
---|
140 | 'KEYWORDS' => array(
|
---|
141 | 1 => 'color: #000000; font-weight: bold;',
|
---|
142 | 2 => 'color: #333399; font-weight: bold;',
|
---|
143 | 3 => 'color: #000066; font-weight: bold;',
|
---|
144 | 4 => 'color: #333399; font-weight: bold;',
|
---|
145 | 5 => 'color: #993333; font-weight: bold;',
|
---|
146 | 6 => 'color: #551111;'
|
---|
147 | ),
|
---|
148 | 'COMMENTS' => array(
|
---|
149 | 1 => 'color: #666666; font-style: italic;',
|
---|
150 | 2 => 'color: #009900;',
|
---|
151 | 'MULTI' => 'color: #666666; font-style: italic;'
|
---|
152 | ),
|
---|
153 | 'ESCAPE_CHAR' => array(
|
---|
154 | 0 => 'color: #000099; font-weight: bold;'
|
---|
155 | ),
|
---|
156 | 'BRACKETS' => array(
|
---|
157 | 0 => 'color: #000066;'
|
---|
158 | ),
|
---|
159 | 'STRINGS' => array(
|
---|
160 | 0 => 'color: #ff0000;'
|
---|
161 | ),
|
---|
162 | 'NUMBERS' => array(
|
---|
163 | 0 => 'color: #0000ff;'
|
---|
164 | ),
|
---|
165 | 'METHODS' => array(
|
---|
166 | 1 => 'color: #006600;'
|
---|
167 | ),
|
---|
168 | 'SYMBOLS' => array(
|
---|
169 | 0 => 'color: #000066;'
|
---|
170 | ),
|
---|
171 | 'REGEXPS' => array(
|
---|
172 | ),
|
---|
173 | 'SCRIPT' => array(
|
---|
174 | )
|
---|
175 | ),
|
---|
176 | 'URLS' => array(
|
---|
177 | 1 => '',
|
---|
178 | 2 => '',
|
---|
179 | 3 => '',
|
---|
180 | 4 => '',
|
---|
181 | 5 => '',
|
---|
182 | 6 => ''
|
---|
183 | ),
|
---|
184 | 'OOLANG' => true,
|
---|
185 | 'OBJECT_SPLITTERS' => array(
|
---|
186 | 1 => '.'
|
---|
187 | ),
|
---|
188 | 'REGEXPS' => array(
|
---|
189 | ),
|
---|
190 | 'STRICT_MODE_APPLIES' => GESHI_NEVER,
|
---|
191 | 'SCRIPT_DELIMITERS' => array(
|
---|
192 | ),
|
---|
193 | 'HIGHLIGHT_STRICT_BLOCK' => array(
|
---|
194 | ),
|
---|
195 | 'TAB_WIDTH' => 4,
|
---|
196 | 'PARSER_CONTROL' => array(
|
---|
197 | 'OOLANG' => array(
|
---|
198 | 'MATCH_BEFORE' => '',
|
---|
199 | 'MATCH_AFTER' => '[a-zA-Z_][a-zA-Z0-9_]*',
|
---|
200 | 'MATCH_SPACES' => '[\s]*'
|
---|
201 | )
|
---|
202 | )
|
---|
203 | );
|
---|
204 |
|
---|
205 | ?> |
---|