|
1 <?php |
|
2 /************************************************************************************* |
|
3 * glsl.php |
|
4 * ----- |
|
5 * Author: Benny Baumann (BenBE@omorphia.de) |
|
6 * Copyright: (c) 2008 Benny Baumann (BenBE@omorphia.de) |
|
7 * Release Version: 1.0.8.2 |
|
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 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
|
45 'QUOTEMARKS' => array("'", '"'), |
|
46 'ESCAPE_CHAR' => '\\', |
|
47 'KEYWORDS' => array( |
|
48 1 => array( |
|
49 'if', 'else', 'for', 'while', 'do', 'break', 'continue', 'asm', |
|
50 'switch', 'case', 'default', 'return', 'discard', |
|
51 'namespace', 'using', 'sizeof', 'cast' |
|
52 ), |
|
53 2 => array( |
|
54 'const', 'uniform', 'attribute', 'centroid', 'varying', 'invariant', |
|
55 'in', 'out', 'inout', 'input', 'output', 'typedef', 'volatile', |
|
56 'public', 'static', 'extern', 'external', 'packed', |
|
57 'inline', 'noinline' |
|
58 ), |
|
59 3 => array( |
|
60 'void', 'bool', 'int', 'long', 'short', 'float', 'half', 'fixed', |
|
61 'unsigned', 'lowp', 'mediump', 'highp', 'precision', |
|
62 'vec2', 'vec3', 'vec4', 'bvec2', 'bvec3', 'bvec4', |
|
63 'dvec2', 'dvec3', 'dvec4', 'fvec2', 'fvec3', 'fvec4', |
|
64 'hvec2', 'hvec3', 'hvec4', 'ivec2', 'ivec3', 'ivec4', |
|
65 'mat2', 'mat3', 'mat4', 'mat2x2', 'mat3x2', 'mat4x2', |
|
66 'mat2x3', 'mat3x3', 'mat4x3', 'mat2x4', 'mat3x4', 'mat4x4', |
|
67 'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube', |
|
68 'sampler1DShadow', 'sampler2DShadow', |
|
69 'struct', 'class', 'union', 'enum', 'interface', 'template' |
|
70 ), |
|
71 4 => array( |
|
72 'this', 'false', 'true' |
|
73 ), |
|
74 5 => array( |
|
75 'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', |
|
76 'pow', 'exp2', 'log2', 'sqrt', 'inversesqrt', 'abs', 'sign', 'ceil', |
|
77 'floor', 'fract', 'mod', 'min', 'max', 'clamp', 'mix', 'step', |
|
78 'smoothstep', 'length', 'distance', 'dot', 'cross', 'normalize', |
|
79 'ftransform', 'faceforward', 'reflect', 'matrixCompMult', 'equal', |
|
80 'lessThan', 'lessThanEqual', 'greaterThan', 'greaterThanEqual', |
|
81 'notEqual', 'any', 'all', 'not', 'texture1D', 'texture1DProj', |
|
82 'texture1DLod', 'texture1DProjLod', 'texture2D', 'texture2DProj', |
|
83 'texture2DLod', 'texture2DProjLod', 'texture3D', 'texture3DProj', |
|
84 'texture3DLod', 'texture3DProjLod', 'textureCube', 'textureCubeLod', |
|
85 'shadow1D', 'shadow1DProj', 'shadow1DLod', 'shadow1DProjLod', |
|
86 'shadow2D', 'shadow2DProj', 'shadow2DLod', 'shadow2DProjLod', |
|
87 'noise1', 'noise2', 'noise3', 'noise4' |
|
88 ), |
|
89 6 => array( |
|
90 'gl_Position', 'gl_PointSize', 'gl_ClipVertex', 'gl_FragColor', |
|
91 'gl_FragData', 'gl_FragDepth', 'gl_FragCoord', 'gl_FrontFacing', |
|
92 'gl_Color', 'gl_SecondaryColor', 'gl_Normal', 'gl_Vertex', |
|
93 'gl_MultiTexCoord0', 'gl_MultiTexCoord1', 'gl_MultiTexCoord2', |
|
94 'gl_MultiTexCoord3', 'gl_MultiTexCoord4', 'gl_MultiTexCoord5', |
|
95 'gl_MultiTexCoord6', 'gl_MultiTexCoord7', 'gl_FogCoord', |
|
96 'gl_MaxLights', 'gl_MaxClipPlanes', 'gl_MaxTextureUnits', |
|
97 'gl_MaxTextureCoords', 'gl_MaxVertexAttribs', 'gl_MaxVaryingFloats', |
|
98 'gl_MaxVertexUniformComponents', 'gl_MaxVertexTextureImageUnits', |
|
99 'gl_MaxCombinedTextureImageUnits', 'gl_MaxTextureImageUnits', |
|
100 'gl_MaxFragmentUniformComponents', 'gl_MaxDrawBuffers', 'gl_Point', |
|
101 'gl_ModelViewMatrix', 'gl_ProjectionMatrix', 'gl_FrontMaterial', |
|
102 'gl_ModelViewProjectionMatrix', 'gl_TextureMatrix', 'gl_ClipPlane', |
|
103 'gl_NormalMatrix', 'gl_ModelViewMatrixInverse', 'gl_BackMaterial', |
|
104 'gl_ProjectionMatrixInverse', 'gl_ModelViewProjectionMatrixInverse', |
|
105 'gl_TextureMatrixInverse', 'gl_ModelViewMatrixTranspose', 'gl_Fog', |
|
106 'gl_ProjectionMatrixTranspose', 'gl_NormalScale', 'gl_DepthRange', |
|
107 'gl_odelViewProjectionMatrixTranspose', 'gl_TextureMatrixTranspose', |
|
108 'gl_ModelViewMatrixInverseTranspose', 'gl_LightSource', |
|
109 'gl_ProjectionMatrixInverseTranspose', 'gl_LightModel', |
|
110 'gl_ModelViewProjectionMatrixInverseTranspose', 'gl_TexCoord', |
|
111 'gl_TextureMatrixInverseTranspose', 'gl_TextureEnvColor', |
|
112 'gl_FrontLightModelProduct', 'gl_BackLightModelProduct', |
|
113 'gl_FrontLightProduct', 'gl_BackLightProduct', 'gl_ObjectPlaneS', |
|
114 'gl_ObjectPlaneT', 'gl_ObjectPlaneR', 'gl_ObjectPlaneQ', |
|
115 'gl_EyePlaneS', 'gl_EyePlaneT', 'gl_EyePlaneR', 'gl_EyePlaneQ', |
|
116 'gl_FrontColor', 'gl_BackColor', 'gl_FrontSecondaryColor', |
|
117 'gl_BackSecondaryColor', 'gl_FogFragCoord', 'gl_PointCoord' |
|
118 ) |
|
119 ), |
|
120 'SYMBOLS' => array( |
|
121 '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', |
|
122 '&', '?', ':', '.', '|', ';', ',', '<', '>' |
|
123 ), |
|
124 'CASE_SENSITIVE' => array( |
|
125 GESHI_COMMENTS => false, |
|
126 1 => true, |
|
127 2 => true, |
|
128 3 => true, |
|
129 4 => true, |
|
130 5 => true, |
|
131 6 => true, |
|
132 ), |
|
133 'STYLES' => array( |
|
134 'KEYWORDS' => array( |
|
135 1 => 'color: #000000; font-weight: bold;', |
|
136 2 => 'color: #333399; font-weight: bold;', |
|
137 3 => 'color: #000066; font-weight: bold;', |
|
138 4 => 'color: #333399; font-weight: bold;', |
|
139 5 => 'color: #993333; font-weight: bold;', |
|
140 6 => 'color: #551111;' |
|
141 ), |
|
142 'COMMENTS' => array( |
|
143 1 => 'color: #666666; font-style: italic;', |
|
144 2 => 'color: #009900;', |
|
145 'MULTI' => 'color: #666666; font-style: italic;' |
|
146 ), |
|
147 'ESCAPE_CHAR' => array( |
|
148 0 => 'color: #000099; font-weight: bold;' |
|
149 ), |
|
150 'BRACKETS' => array( |
|
151 0 => 'color: #000066;' |
|
152 ), |
|
153 'STRINGS' => array( |
|
154 0 => 'color: #ff0000;' |
|
155 ), |
|
156 'NUMBERS' => array( |
|
157 0 => 'color: #0000ff;' |
|
158 ), |
|
159 'METHODS' => array( |
|
160 1 => 'color: #006600;' |
|
161 ), |
|
162 'SYMBOLS' => array( |
|
163 0 => 'color: #000066;' |
|
164 ), |
|
165 'REGEXPS' => array( |
|
166 ), |
|
167 'SCRIPT' => array( |
|
168 ) |
|
169 ), |
|
170 'URLS' => array( |
|
171 1 => '', |
|
172 2 => '', |
|
173 3 => '', |
|
174 4 => '', |
|
175 5 => '', |
|
176 6 => '' |
|
177 ), |
|
178 'OOLANG' => true, |
|
179 'OBJECT_SPLITTERS' => array( |
|
180 1 => '.' |
|
181 ), |
|
182 'REGEXPS' => array( |
|
183 ), |
|
184 'STRICT_MODE_APPLIES' => GESHI_NEVER, |
|
185 'SCRIPT_DELIMITERS' => array( |
|
186 ), |
|
187 'HIGHLIGHT_STRICT_BLOCK' => array( |
|
188 ), |
|
189 'TAB_WIDTH' => 4, |
|
190 'PARSER_CONTROL' => array( |
|
191 'OOLANG' => array( |
|
192 'MATCH_BEFORE' => '', |
|
193 'MATCH_AFTER' => '[a-zA-Z_][a-zA-Z0-9_]*', |
|
194 'MATCH_SPACES' => '[\s]*' |
|
195 ) |
|
196 ) |
|
197 ); |
|
198 |
|
199 ?> |