Merge remote branch 'origin/gallium-0.1' into nouveau-gallium-0.1
[mesa.git] / src / mesa / shader / slang / library / slang_shader_syn.h
1
2 /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */
3
4 ".syntax translation_unit;\n"
5 ".emtcode REVISION 3\n"
6 ".emtcode EXTERNAL_NULL 0\n"
7 ".emtcode EXTERNAL_FUNCTION_DEFINITION 1\n"
8 ".emtcode EXTERNAL_DECLARATION 2\n"
9 ".emtcode DEFAULT_PRECISION 3\n"
10 ".emtcode INVARIANT_STMT 4\n"
11 ".emtcode PRECISION_LOW 0\n"
12 ".emtcode PRECISION_MEDIUM 1\n"
13 ".emtcode PRECISION_HIGH 2\n"
14 ".emtcode DECLARATION_FUNCTION_PROTOTYPE 1\n"
15 ".emtcode DECLARATION_INIT_DECLARATOR_LIST 2\n"
16 ".emtcode FUNCTION_ORDINARY 0\n"
17 ".emtcode FUNCTION_CONSTRUCTOR 1\n"
18 ".emtcode FUNCTION_OPERATOR 2\n"
19 ".emtcode OPERATOR_ADDASSIGN 1\n"
20 ".emtcode OPERATOR_SUBASSIGN 2\n"
21 ".emtcode OPERATOR_MULASSIGN 3\n"
22 ".emtcode OPERATOR_DIVASSIGN 4\n"
23 ".emtcode OPERATOR_LOGICALXOR 11\n"
24 ".emtcode OPERATOR_LESS 15\n"
25 ".emtcode OPERATOR_GREATER 16\n"
26 ".emtcode OPERATOR_LESSEQUAL 17\n"
27 ".emtcode OPERATOR_GREATEREQUAL 18\n"
28 ".emtcode OPERATOR_MULTIPLY 21\n"
29 ".emtcode OPERATOR_DIVIDE 22\n"
30 ".emtcode OPERATOR_INCREMENT 24\n"
31 ".emtcode OPERATOR_DECREMENT 25\n"
32 ".emtcode OPERATOR_PLUS 26\n"
33 ".emtcode OPERATOR_MINUS 27\n"
34 ".emtcode OPERATOR_NOT 29\n"
35 ".emtcode DECLARATOR_NONE 0\n"
36 ".emtcode DECLARATOR_NEXT 1\n"
37 ".emtcode VARIABLE_NONE 0\n"
38 ".emtcode VARIABLE_IDENTIFIER 1\n"
39 ".emtcode VARIABLE_INITIALIZER 2\n"
40 ".emtcode VARIABLE_ARRAY_EXPLICIT 3\n"
41 ".emtcode VARIABLE_ARRAY_UNKNOWN 4\n"
42 ".emtcode TYPE_QUALIFIER_NONE 0\n"
43 ".emtcode TYPE_QUALIFIER_CONST 1\n"
44 ".emtcode TYPE_QUALIFIER_ATTRIBUTE 2\n"
45 ".emtcode TYPE_QUALIFIER_VARYING 3\n"
46 ".emtcode TYPE_QUALIFIER_UNIFORM 4\n"
47 ".emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5\n"
48 ".emtcode TYPE_QUALIFIER_FIXEDINPUT 6\n"
49 ".emtcode TYPE_SPECIFIER_VOID 0\n"
50 ".emtcode TYPE_SPECIFIER_BOOL 1\n"
51 ".emtcode TYPE_SPECIFIER_BVEC2 2\n"
52 ".emtcode TYPE_SPECIFIER_BVEC3 3\n"
53 ".emtcode TYPE_SPECIFIER_BVEC4 4\n"
54 ".emtcode TYPE_SPECIFIER_INT 5\n"
55 ".emtcode TYPE_SPECIFIER_IVEC2 6\n"
56 ".emtcode TYPE_SPECIFIER_IVEC3 7\n"
57 ".emtcode TYPE_SPECIFIER_IVEC4 8\n"
58 ".emtcode TYPE_SPECIFIER_FLOAT 9\n"
59 ".emtcode TYPE_SPECIFIER_VEC2 10\n"
60 ".emtcode TYPE_SPECIFIER_VEC3 11\n"
61 ".emtcode TYPE_SPECIFIER_VEC4 12\n"
62 ".emtcode TYPE_SPECIFIER_MAT2 13\n"
63 ".emtcode TYPE_SPECIFIER_MAT3 14\n"
64 ".emtcode TYPE_SPECIFIER_MAT4 15\n"
65 ".emtcode TYPE_SPECIFIER_SAMPLER1D 16\n"
66 ".emtcode TYPE_SPECIFIER_SAMPLER2D 17\n"
67 ".emtcode TYPE_SPECIFIER_SAMPLER3D 18\n"
68 ".emtcode TYPE_SPECIFIER_SAMPLERCUBE 19\n"
69 ".emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20\n"
70 ".emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21\n"
71 ".emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22\n"
72 ".emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23\n"
73 ".emtcode TYPE_SPECIFIER_STRUCT 24\n"
74 ".emtcode TYPE_SPECIFIER_TYPENAME 25\n"
75 ".emtcode TYPE_SPECIFIER_MAT23 26\n"
76 ".emtcode TYPE_SPECIFIER_MAT32 27\n"
77 ".emtcode TYPE_SPECIFIER_MAT24 28\n"
78 ".emtcode TYPE_SPECIFIER_MAT42 29\n"
79 ".emtcode TYPE_SPECIFIER_MAT34 30\n"
80 ".emtcode TYPE_SPECIFIER_MAT43 31\n"
81 ".emtcode FIELD_NONE 0\n"
82 ".emtcode FIELD_NEXT 1\n"
83 ".emtcode FIELD_ARRAY 2\n"
84 ".emtcode OP_END 0\n"
85 ".emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1\n"
86 ".emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2\n"
87 ".emtcode OP_DECLARE 3\n"
88 ".emtcode OP_ASM 4\n"
89 ".emtcode OP_BREAK 5\n"
90 ".emtcode OP_CONTINUE 6\n"
91 ".emtcode OP_DISCARD 7\n"
92 ".emtcode OP_RETURN 8\n"
93 ".emtcode OP_EXPRESSION 9\n"
94 ".emtcode OP_IF 10\n"
95 ".emtcode OP_WHILE 11\n"
96 ".emtcode OP_DO 12\n"
97 ".emtcode OP_FOR 13\n"
98 ".emtcode OP_PUSH_VOID 14\n"
99 ".emtcode OP_PUSH_BOOL 15\n"
100 ".emtcode OP_PUSH_INT 16\n"
101 ".emtcode OP_PUSH_FLOAT 17\n"
102 ".emtcode OP_PUSH_IDENTIFIER 18\n"
103 ".emtcode OP_SEQUENCE 19\n"
104 ".emtcode OP_ASSIGN 20\n"
105 ".emtcode OP_ADDASSIGN 21\n"
106 ".emtcode OP_SUBASSIGN 22\n"
107 ".emtcode OP_MULASSIGN 23\n"
108 ".emtcode OP_DIVASSIGN 24\n"
109 ".emtcode OP_SELECT 31\n"
110 ".emtcode OP_LOGICALOR 32\n"
111 ".emtcode OP_LOGICALXOR 33\n"
112 ".emtcode OP_LOGICALAND 34\n"
113 ".emtcode OP_EQUAL 38\n"
114 ".emtcode OP_NOTEQUAL 39\n"
115 ".emtcode OP_LESS 40\n"
116 ".emtcode OP_GREATER 41\n"
117 ".emtcode OP_LESSEQUAL 42\n"
118 ".emtcode OP_GREATEREQUAL 43\n"
119 ".emtcode OP_ADD 46\n"
120 ".emtcode OP_SUBTRACT 47\n"
121 ".emtcode OP_MULTIPLY 48\n"
122 ".emtcode OP_DIVIDE 49\n"
123 ".emtcode OP_PREINCREMENT 51\n"
124 ".emtcode OP_PREDECREMENT 52\n"
125 ".emtcode OP_PLUS 53\n"
126 ".emtcode OP_MINUS 54\n"
127 ".emtcode OP_NOT 56\n"
128 ".emtcode OP_SUBSCRIPT 57\n"
129 ".emtcode OP_CALL 58\n"
130 ".emtcode OP_FIELD 59\n"
131 ".emtcode OP_POSTINCREMENT 60\n"
132 ".emtcode OP_POSTDECREMENT 61\n"
133 ".emtcode PARAM_QUALIFIER_IN 0\n"
134 ".emtcode PARAM_QUALIFIER_OUT 1\n"
135 ".emtcode PARAM_QUALIFIER_INOUT 2\n"
136 ".emtcode PARAMETER_NONE 0\n"
137 ".emtcode PARAMETER_NEXT 1\n"
138 ".emtcode PARAMETER_ARRAY_NOT_PRESENT 0\n"
139 ".emtcode PARAMETER_ARRAY_PRESENT 1\n"
140 ".errtext INVALID_EXTERNAL_DECLARATION \"2001: Syntax error.\"\n"
141 ".errtext INVALID_OPERATOR_OVERRIDE \"2002: Invalid operator override.\"\n"
142 ".errtext LBRACE_EXPECTED \"2003: '{' expected but '$err_token$' found.\"\n"
143 ".errtext LPAREN_EXPECTED \"2004: '(' expected but '$err_token$' found.\"\n"
144 ".errtext RPAREN_EXPECTED \"2005: ')' expected but '$err_token$' found.\"\n"
145 ".errtext INVALID_PRECISION \"2006: Invalid precision specifier '$err_token$'.\"\n"
146 ".errtext INVALID_PRECISION_TYPE \"2007: Invalid precision type '$err_token$'.\"\n"
147 ".regbyte parsing_builtin 0\n"
148 ".regbyte shader_type 0\n"
149 "variable_identifier\n"
150 " identifier .emit OP_PUSH_IDENTIFIER;\n"
151 "primary_expression\n"
152 " floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;\n"
153 "primary_expression_1\n"
154 " lparen .and expression .and rparen;\n"
155 "postfix_expression\n"
156 " postfix_expression_1 .and .loop postfix_expression_2;\n"
157 "postfix_expression_1\n"
158 " function_call .or primary_expression;\n"
159 "postfix_expression_2\n"
160 " postfix_expression_3 .or postfix_expression_4 .or\n"
161 " plusplus .emit OP_POSTINCREMENT .or\n"
162 " minusminus .emit OP_POSTDECREMENT;\n"
163 "postfix_expression_3\n"
164 " lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;\n"
165 "postfix_expression_4\n"
166 " dot .and field_selection .emit OP_FIELD;\n"
167 "integer_expression\n"
168 " expression;\n"
169 "function_call\n"
170 " function_call_generic .emit OP_CALL .and .true .emit OP_END;\n"
171 "function_call_generic\n"
172 " function_call_generic_1 .or function_call_generic_2;\n"
173 "function_call_generic_1\n"
174 " function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;\n"
175 "function_call_generic_2\n"
176 " function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;\n"
177 "function_call_header_no_parameters\n"
178 " function_call_header .and function_call_header_no_parameters_1;\n"
179 "function_call_header_no_parameters_1\n"
180 " \"void\" .or .true;\n"
181 "function_call_header_with_parameters\n"
182 " function_call_header .and assignment_expression .and .true .emit OP_END .and\n"
183 " .loop function_call_header_with_parameters_1;\n"
184 "function_call_header_with_parameters_1\n"
185 " comma .and assignment_expression .and .true .emit OP_END;\n"
186 "function_call_header\n"
187 " function_identifier .and lparen;\n"
188 "function_identifier\n"
189 " identifier;\n"
190 "unary_expression\n"
191 " postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n"
192 " unary_expression_4 .or unary_expression_5;\n"
193 "unary_expression_1\n"
194 " plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;\n"
195 "unary_expression_2\n"
196 " minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;\n"
197 "unary_expression_3\n"
198 " plus .and unary_expression .and .true .emit OP_PLUS;\n"
199 "unary_expression_4\n"
200 " minus .and unary_expression .and .true .emit OP_MINUS;\n"
201 "unary_expression_5\n"
202 " bang .and unary_expression .and .true .emit OP_NOT;\n"
203 "multiplicative_expression\n"
204 " unary_expression .and .loop multiplicative_expression_1;\n"
205 "multiplicative_expression_1\n"
206 " multiplicative_expression_2 .or multiplicative_expression_3;\n"
207 "multiplicative_expression_2\n"
208 " star .and unary_expression .and .true .emit OP_MULTIPLY;\n"
209 "multiplicative_expression_3\n"
210 " slash .and unary_expression .and .true .emit OP_DIVIDE;\n"
211 "additive_expression\n"
212 " multiplicative_expression .and .loop additive_expression_1;\n"
213 "additive_expression_1\n"
214 " additive_expression_2 .or additive_expression_3;\n"
215 "additive_expression_2\n"
216 " plus .and multiplicative_expression .and .true .emit OP_ADD;\n"
217 "additive_expression_3\n"
218 " minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n"
219 "shift_expression\n"
220 " additive_expression;\n"
221 "relational_expression\n"
222 " shift_expression .and .loop relational_expression_1;\n"
223 "relational_expression_1\n"
224 " relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n"
225 " relational_expression_5;\n"
226 "relational_expression_2\n"
227 " lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n"
228 "relational_expression_3\n"
229 " greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n"
230 "relational_expression_4\n"
231 " less .and shift_expression .and .true .emit OP_LESS;\n"
232 "relational_expression_5\n"
233 " greater .and shift_expression .and .true .emit OP_GREATER;\n"
234 "equality_expression\n"
235 " relational_expression .and .loop equality_expression_1;\n"
236 "equality_expression_1\n"
237 " equality_expression_2 .or equality_expression_3;\n"
238 "equality_expression_2\n"
239 " equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n"
240 "equality_expression_3\n"
241 " bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n"
242 "and_expression\n"
243 " equality_expression;\n"
244 "exclusive_or_expression\n"
245 " and_expression;\n"
246 "inclusive_or_expression\n"
247 " exclusive_or_expression;\n"
248 "logical_and_expression\n"
249 " inclusive_or_expression .and .loop logical_and_expression_1;\n"
250 "logical_and_expression_1\n"
251 " ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;\n"
252 "logical_xor_expression\n"
253 " logical_and_expression .and .loop logical_xor_expression_1;\n"
254 "logical_xor_expression_1\n"
255 " caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;\n"
256 "logical_or_expression\n"
257 " logical_xor_expression .and .loop logical_or_expression_1;\n"
258 "logical_or_expression_1\n"
259 " barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;\n"
260 "conditional_expression\n"
261 " logical_or_expression .and .loop conditional_expression_1;\n"
262 "conditional_expression_1\n"
263 " question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;\n"
264 "assignment_expression\n"
265 " assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or\n"
266 " assignment_expression_4 .or assignment_expression_5 .or conditional_expression;\n"
267 "assignment_expression_1\n"
268 " unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;\n"
269 "assignment_expression_2\n"
270 " unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;\n"
271 "assignment_expression_3\n"
272 " unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;\n"
273 "assignment_expression_4\n"
274 " unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;\n"
275 "assignment_expression_5\n"
276 " unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;\n"
277 "expression\n"
278 " assignment_expression .and .loop expression_1;\n"
279 "expression_1\n"
280 " comma .and assignment_expression .and .true .emit OP_SEQUENCE;\n"
281 "constant_expression\n"
282 " conditional_expression .and .true .emit OP_END;\n"
283 "declaration\n"
284 " declaration_1 .or declaration_2;\n"
285 "declaration_1\n"
286 " function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;\n"
287 "declaration_2\n"
288 " init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;\n"
289 "function_prototype\n"
290 " function_prototype_1 .or function_prototype_2;\n"
291 "function_prototype_1\n"
292 " function_header .and \"void\" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n"
293 "function_prototype_2\n"
294 " function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n"
295 "function_declarator\n"
296 " function_header_with_parameters .or function_header;\n"
297 "function_header_with_parameters\n"
298 " function_header .and parameter_declaration .and .loop function_header_with_parameters_1;\n"
299 "function_header_with_parameters_1\n"
300 " comma .and parameter_declaration;\n"
301 "function_header\n"
302 " function_header_nospace .or function_header_space;\n"
303 "function_header_space\n"
304 " fully_specified_type_space .and space .and function_decl_identifier .and lparen;\n"
305 "function_header_nospace\n"
306 " fully_specified_type_nospace .and function_decl_identifier .and lparen;\n"
307 "function_decl_identifier\n"
308 " .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or\n"
309 " .if (parsing_builtin != 0) \"__constructor\" .emit FUNCTION_CONSTRUCTOR .or\n"
310 " identifier .emit FUNCTION_ORDINARY;\n"
311 "__operator\n"
312 " \"__operator\" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;\n"
313 "overriden_operator\n"
314 " plusplus .emit OPERATOR_INCREMENT .or\n"
315 " plusequals .emit OPERATOR_ADDASSIGN .or\n"
316 " plus .emit OPERATOR_PLUS .or\n"
317 " minusminus .emit OPERATOR_DECREMENT .or\n"
318 " minusequals .emit OPERATOR_SUBASSIGN .or\n"
319 " minus .emit OPERATOR_MINUS .or\n"
320 " bang .emit OPERATOR_NOT .or\n"
321 " starequals .emit OPERATOR_MULASSIGN .or\n"
322 " star .emit OPERATOR_MULTIPLY .or\n"
323 " slashequals .emit OPERATOR_DIVASSIGN .or\n"
324 " slash .emit OPERATOR_DIVIDE .or\n"
325 " lessequals .emit OPERATOR_LESSEQUAL .or\n"
326 " \n"
327 " \n"
328 " less .emit OPERATOR_LESS .or\n"
329 " greaterequals .emit OPERATOR_GREATEREQUAL .or\n"
330 " \n"
331 " \n"
332 " greater .emit OPERATOR_GREATER .or\n"
333 " \n"
334 " \n"
335 " \n"
336 " \n"
337 " \n"
338 " \n"
339 " \n"
340 " \n"
341 " caretcaret .emit OPERATOR_LOGICALXOR ;\n"
342 "parameter_declarator\n"
343 " parameter_declarator_nospace .or parameter_declarator_space;\n"
344 "parameter_declarator_nospace\n"
345 " type_specifier_nospace .and identifier .and parameter_declarator_1;\n"
346 "parameter_declarator_space\n"
347 " type_specifier_space .and space .and identifier .and parameter_declarator_1;\n"
348 "parameter_declarator_1\n"
349 " parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or\n"
350 " .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n"
351 "parameter_declarator_2\n"
352 " lbracket .and constant_expression .and rbracket;\n"
353 "parameter_declaration\n"
354 " parameter_declaration_1 .emit PARAMETER_NEXT;\n"
355 "parameter_declaration_1\n"
356 " parameter_declaration_2 .or parameter_declaration_3;\n"
357 "parameter_declaration_2\n"
358 " type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;\n"
359 "parameter_declaration_3\n"
360 " parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;\n"
361 "parameter_declaration_4\n"
362 " parameter_declarator .or parameter_type_specifier;\n"
363 "parameter_qualifier\n"
364 " parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;\n"
365 "parameter_qualifier_1\n"
366 " parameter_qualifier_2 .and space;\n"
367 "parameter_qualifier_2\n"
368 " \"in\" .emit PARAM_QUALIFIER_IN .or\n"
369 " \"out\" .emit PARAM_QUALIFIER_OUT .or\n"
370 " \"inout\" .emit PARAM_QUALIFIER_INOUT;\n"
371 "parameter_type_specifier\n"
372 " parameter_type_specifier_1 .and .true .emit '\\0' .and parameter_type_specifier_2;\n"
373 "parameter_type_specifier_1\n"
374 " type_specifier_nospace .or type_specifier_space;\n"
375 "parameter_type_specifier_2\n"
376 " parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or\n"
377 " .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n"
378 "parameter_type_specifier_3\n"
379 " lbracket .and constant_expression .and rbracket;\n"
380 "init_declarator_list\n"
381 " single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and\n"
382 " .true .emit DECLARATOR_NONE;\n"
383 "init_declarator_list_1\n"
384 " comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;\n"
385 "init_declarator_list_2\n"
386 " init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;\n"
387 "init_declarator_list_3\n"
388 " equals .and initializer .emit VARIABLE_INITIALIZER;\n"
389 "init_declarator_list_4\n"
390 " lbracket .and init_declarator_list_5 .and rbracket;\n"
391 "init_declarator_list_5\n"
392 " constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n"
393 "single_declaration\n"
394 " single_declaration_nospace .or single_declaration_space;\n"
395 "single_declaration_space\n"
396 " fully_specified_type_space .and single_declaration_space_1;\n"
397 "single_declaration_nospace\n"
398 " fully_specified_type_nospace .and single_declaration_nospace_1;\n"
399 "single_declaration_space_1\n"
400 " single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n"
401 "single_declaration_nospace_1\n"
402 " single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n"
403 "single_declaration_space_2\n"
404 " space .and identifier .and single_declaration_3;\n"
405 "single_declaration_nospace_2\n"
406 " identifier .and single_declaration_3;\n"
407 "single_declaration_3\n"
408 " single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;\n"
409 "single_declaration_4\n"
410 " equals .and initializer .emit VARIABLE_INITIALIZER;\n"
411 "single_declaration_5\n"
412 " lbracket .and single_declaration_6 .and rbracket;\n"
413 "single_declaration_6\n"
414 " constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n"
415 "fully_specified_type_space\n"
416 " fully_specified_type_1 .and type_specifier_space;\n"
417 "fully_specified_type_nospace\n"
418 " fully_specified_type_1 .and type_specifier_nospace;\n"
419 "fully_specified_type_1\n"
420 " fully_specified_type_2 .or .true .emit TYPE_QUALIFIER_NONE;\n"
421 "fully_specified_type_2\n"
422 " type_qualifier .and space;\n"
423 "type_qualifier\n"
424 " \"const\" .emit TYPE_QUALIFIER_CONST .or\n"
425 " .if (shader_type == 2) \"attribute\" .emit TYPE_QUALIFIER_ATTRIBUTE .or\n"
426 " \"varying\" .emit TYPE_QUALIFIER_VARYING .or\n"
427 " \"uniform\" .emit TYPE_QUALIFIER_UNIFORM .or\n"
428 " .if (parsing_builtin != 0) \"__fixed_output\" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or\n"
429 " .if (parsing_builtin != 0) \"__fixed_input\" .emit TYPE_QUALIFIER_FIXEDINPUT;\n"
430 "type_specifier_space\n"
431 " \"void\" .emit TYPE_SPECIFIER_VOID .or\n"
432 " \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n"
433 " \"int\" .emit TYPE_SPECIFIER_INT .or\n"
434 " \"bool\" .emit TYPE_SPECIFIER_BOOL .or\n"
435 " \"vec2\" .emit TYPE_SPECIFIER_VEC2 .or\n"
436 " \"vec3\" .emit TYPE_SPECIFIER_VEC3 .or\n"
437 " \"vec4\" .emit TYPE_SPECIFIER_VEC4 .or\n"
438 " \"bvec2\" .emit TYPE_SPECIFIER_BVEC2 .or\n"
439 " \"bvec3\" .emit TYPE_SPECIFIER_BVEC3 .or\n"
440 " \"bvec4\" .emit TYPE_SPECIFIER_BVEC4 .or\n"
441 " \"ivec2\" .emit TYPE_SPECIFIER_IVEC2 .or\n"
442 " \"ivec3\" .emit TYPE_SPECIFIER_IVEC3 .or\n"
443 " \"ivec4\" .emit TYPE_SPECIFIER_IVEC4 .or\n"
444 " \"mat2\" .emit TYPE_SPECIFIER_MAT2 .or\n"
445 " \"mat3\" .emit TYPE_SPECIFIER_MAT3 .or\n"
446 " \"mat4\" .emit TYPE_SPECIFIER_MAT4 .or\n"
447 " \"mat2x3\" .emit TYPE_SPECIFIER_MAT23 .or\n"
448 " \"mat3x2\" .emit TYPE_SPECIFIER_MAT32 .or\n"
449 " \"mat2x4\" .emit TYPE_SPECIFIER_MAT24 .or\n"
450 " \"mat4x2\" .emit TYPE_SPECIFIER_MAT42 .or\n"
451 " \"mat3x4\" .emit TYPE_SPECIFIER_MAT34 .or\n"
452 " \"mat4x3\" .emit TYPE_SPECIFIER_MAT43 .or\n"
453 " \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n"
454 " \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n"
455 " \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n"
456 " \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n"
457 " \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n"
458 " \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n"
459 " \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n"
460 " \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or\n"
461 " type_name .emit TYPE_SPECIFIER_TYPENAME;\n"
462 "type_specifier_nospace\n"
463 " struct_specifier .emit TYPE_SPECIFIER_STRUCT;\n"
464 "struct_specifier\n"
465 " \"struct\" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and\n"
466 " struct_declaration_list .and rbrace .emit FIELD_NONE;\n"
467 "struct_specifier_1\n"
468 " struct_specifier_2 .or .true .emit '\\0';\n"
469 "struct_specifier_2\n"
470 " space .and identifier;\n"
471 "struct_declaration_list\n"
472 " struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;\n"
473 "struct_declaration\n"
474 " struct_declaration_nospace .or struct_declaration_space;\n"
475 "struct_declaration_space\n"
476 " type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n"
477 "struct_declaration_nospace\n"
478 " type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n"
479 "struct_declarator_list\n"
480 " struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;\n"
481 "struct_declarator_list_1\n"
482 " comma .and struct_declarator;\n"
483 "struct_declarator\n"
484 " identifier .and struct_declarator_1;\n"
485 "struct_declarator_1\n"
486 " struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;\n"
487 "struct_declarator_2\n"
488 " lbracket .and constant_expression .and rbracket;\n"
489 "initializer\n"
490 " assignment_expression .and .true .emit OP_END;\n"
491 "declaration_statement\n"
492 " declaration;\n"
493 "statement\n"
494 " compound_statement .or simple_statement;\n"
495 "statement_space\n"
496 " compound_statement .or statement_space_1;\n"
497 "statement_space_1\n"
498 " space .and simple_statement;\n"
499 "simple_statement\n"
500 " .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or\n"
501 " selection_statement .or\n"
502 " iteration_statement .or\n"
503 " jump_statement .or\n"
504 " expression_statement .emit OP_EXPRESSION .or\n"
505 " declaration_statement .emit OP_DECLARE;\n"
506 "compound_statement\n"
507 " compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;\n"
508 "compound_statement_1\n"
509 " compound_statement_2 .or compound_statement_3;\n"
510 "compound_statement_2\n"
511 " lbrace .and rbrace;\n"
512 "compound_statement_3\n"
513 " lbrace .and statement_list .and rbrace;\n"
514 "statement_no_new_scope\n"
515 " compound_statement_no_new_scope .or simple_statement;\n"
516 "compound_statement_no_new_scope\n"
517 " compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;\n"
518 "compound_statement_no_new_scope_1\n"
519 " compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;\n"
520 "compound_statement_no_new_scope_2\n"
521 " lbrace .and rbrace;\n"
522 "compound_statement_no_new_scope_3\n"
523 " lbrace .and statement_list .and rbrace;\n"
524 "statement_list\n"
525 " statement .and .loop statement;\n"
526 "expression_statement\n"
527 " expression_statement_1 .or expression_statement_2;\n"
528 "expression_statement_1\n"
529 " semicolon .emit OP_PUSH_VOID .emit OP_END;\n"
530 "expression_statement_2\n"
531 " expression .and semicolon .emit OP_END;\n"
532 "selection_statement\n"
533 " \"if\" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and\n"
534 " rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;\n"
535 "selection_rest_statement\n"
536 " statement .and selection_rest_statement_1;\n"
537 "selection_rest_statement_1\n"
538 " selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;\n"
539 "selection_rest_statement_2\n"
540 " \"else\" .and optional_space .and statement;\n"
541 "condition\n"
542 " condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or\n"
543 " condition_3 .emit OP_EXPRESSION;\n"
544 "condition_1\n"
545 " condition_1_nospace .or condition_1_space;\n"
546 "condition_1_nospace\n"
547 " fully_specified_type_nospace .and condition_2;\n"
548 "condition_1_space\n"
549 " fully_specified_type_space .and space .and condition_2;\n"
550 "condition_2\n"
551 " identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and\n"
552 " initializer .and .true .emit DECLARATOR_NONE;\n"
553 "condition_3\n"
554 " expression .and .true .emit OP_END;\n"
555 "iteration_statement\n"
556 " iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n"
557 "iteration_statement_1\n"
558 " \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n"
559 " rparen .error RPAREN_EXPECTED .and statement;\n"
560 "iteration_statement_2\n"
561 " \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n"
562 " expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n"
563 "iteration_statement_3\n"
564 " \"for\" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and\n"
565 " for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n"
566 "for_init_statement\n"
567 " expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;\n"
568 "conditionopt\n"
569 " condition .or\n"
570 " .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\\0' .emit OP_END;\n"
571 "for_rest_statement\n"
572 " conditionopt .and semicolon .and for_rest_statement_1;\n"
573 "for_rest_statement_1\n"
574 " for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;\n"
575 "for_rest_statement_2\n"
576 " expression .and .true .emit OP_END;\n"
577 "jump_statement\n"
578 " jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or\n"
579 " .if (shader_type == 1) jump_statement_5;\n"
580 "jump_statement_1\n"
581 " \"continue\" .and semicolon .emit OP_CONTINUE;\n"
582 "jump_statement_2\n"
583 " \"break\" .and semicolon .emit OP_BREAK;\n"
584 "jump_statement_3\n"
585 " \"return\" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;\n"
586 "jump_statement_4\n"
587 " \"return\" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;\n"
588 "jump_statement_5\n"
589 " \"discard\" .and semicolon .emit OP_DISCARD;\n"
590 "__asm_statement\n"
591 " \"__asm\" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;\n"
592 "asm_arguments\n"
593 " asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;\n"
594 "asm_arguments_1\n"
595 " comma .and asm_argument .and .true .emit OP_END;\n"
596 "asm_argument\n"
597 " var_with_field .or\n"
598 " variable_identifier .or\n"
599 " floatconstant;\n"
600 "var_with_field\n"
601 " variable_identifier .and dot .and field_selection .emit OP_FIELD;\n"
602 "translation_unit\n"
603 " optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and\n"
604 " .loop external_declaration .and optional_space .and\n"
605 " '\\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;\n"
606 "external_declaration\n"
607 " precision_stmt .emit DEFAULT_PRECISION .or\n"
608 " invariant_stmt .emit INVARIANT_STMT .or\n"
609 " function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or\n"
610 " declaration .emit EXTERNAL_DECLARATION;\n"
611 "precision_stmt\n"
612 " \"precision\" .and space .and precision .error INVALID_PRECISION .and space .and prectype .error INVALID_PRECISION_TYPE .and semicolon;\n"
613 "precision\n"
614 " \"lowp\" .emit PRECISION_LOW .or\n"
615 " \"mediump\" .emit PRECISION_MEDIUM .or\n"
616 " \"highp\" .emit PRECISION_HIGH;\n"
617 "prectype\n"
618 " \"int\" .emit TYPE_SPECIFIER_INT .or\n"
619 " \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n"
620 " \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n"
621 " \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n"
622 " \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n"
623 " \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n"
624 " \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n"
625 " \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n"
626 " \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n"
627 " \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW;\n"
628 "invariant_stmt\n"
629 " \"invariant\" .and space .and identifier .and semicolon;\n"
630 "function_definition\n"
631 " function_prototype .and compound_statement_no_new_scope;\n"
632 "digit_oct\n"
633 " '0'-'7';\n"
634 "digit_dec\n"
635 " '0'-'9';\n"
636 "digit_hex\n"
637 " '0'-'9' .or 'A'-'F' .or 'a'-'f';\n"
638 "id_character_first\n"
639 " 'a'-'z' .or 'A'-'Z' .or '_';\n"
640 "id_character_next\n"
641 " id_character_first .or digit_dec;\n"
642 "identifier\n"
643 " id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\\0';\n"
644 "float\n"
645 " float_1 .or float_2;\n"
646 "float_1\n"
647 " float_fractional_constant .and float_optional_exponent_part;\n"
648 "float_2\n"
649 " float_digit_sequence .and .true .emit '\\0' .and float_exponent_part;\n"
650 "float_fractional_constant\n"
651 " float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n"
652 "float_fractional_constant_1\n"
653 " float_digit_sequence .and '.' .and float_digit_sequence;\n"
654 "float_fractional_constant_2\n"
655 " float_digit_sequence .and '.' .and .true .emit '\\0';\n"
656 "float_fractional_constant_3\n"
657 " '.' .emit '\\0' .and float_digit_sequence;\n"
658 "float_optional_exponent_part\n"
659 " float_exponent_part .or .true .emit '\\0';\n"
660 "float_digit_sequence\n"
661 " digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
662 "float_exponent_part\n"
663 " float_exponent_part_1 .or float_exponent_part_2;\n"
664 "float_exponent_part_1\n"
665 " 'e' .and float_optional_sign .and float_digit_sequence;\n"
666 "float_exponent_part_2\n"
667 " 'E' .and float_optional_sign .and float_digit_sequence;\n"
668 "float_optional_sign\n"
669 " float_sign .or .true;\n"
670 "float_sign\n"
671 " '+' .or '-' .emit '-';\n"
672 "integer\n"
673 " integer_hex .or integer_oct .or integer_dec;\n"
674 "integer_hex\n"
675 " '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and\n"
676 " .true .emit '\\0';\n"
677 "integer_hex_1\n"
678 " 'x' .or 'X';\n"
679 "integer_oct\n"
680 " '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\\0';\n"
681 "integer_dec\n"
682 " digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
683 "boolean\n"
684 " \"true\" .emit 2 .emit '1' .emit '\\0' .or\n"
685 " \"false\" .emit 2 .emit '0' .emit '\\0';\n"
686 "type_name\n"
687 " identifier;\n"
688 "field_selection\n"
689 " identifier;\n"
690 "floatconstant\n"
691 " float .emit OP_PUSH_FLOAT;\n"
692 "intconstant\n"
693 " integer .emit OP_PUSH_INT;\n"
694 "boolconstant\n"
695 " boolean .emit OP_PUSH_BOOL;\n"
696 "optional_space\n"
697 " .loop single_space;\n"
698 "space\n"
699 " single_space .and .loop single_space;\n"
700 "single_space\n"
701 " white_char .or c_style_comment_block .or cpp_style_comment_block;\n"
702 "white_char\n"
703 " ' ' .or '\\t' .or new_line .or '\\v' .or '\\f';\n"
704 "new_line\n"
705 " cr_lf .or lf_cr .or '\\n' .or '\\r';\n"
706 "cr_lf\n"
707 " '\\r' .and '\\n';\n"
708 "lf_cr\n"
709 " '\\n' .and '\\r';\n"
710 "c_style_comment_block\n"
711 " '/' .and '*' .and c_style_comment_rest;\n"
712 "c_style_comment_rest\n"
713 " .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n"
714 "c_style_comment_rest_1\n"
715 " c_style_comment_end .or c_style_comment_rest_2;\n"
716 "c_style_comment_rest_2\n"
717 " '*' .and c_style_comment_rest;\n"
718 "c_style_comment_char_no_star\n"
719 " '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
720 "c_style_comment_end\n"
721 " '*' .and '/';\n"
722 "cpp_style_comment_block\n"
723 " '/' .and '/' .and cpp_style_comment_block_1;\n"
724 "cpp_style_comment_block_1\n"
725 " cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"
726 "cpp_style_comment_block_2\n"
727 " .loop cpp_style_comment_char .and new_line;\n"
728 "cpp_style_comment_block_3\n"
729 " .loop cpp_style_comment_char;\n"
730 "cpp_style_comment_char\n"
731 " '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
732 "ampersandampersand\n"
733 " optional_space .and '&' .and '&' .and optional_space;\n"
734 "barbar\n"
735 " optional_space .and '|' .and '|' .and optional_space;\n"
736 "bang\n"
737 " optional_space .and '!' .and optional_space;\n"
738 "bangequals\n"
739 " optional_space .and '!' .and '=' .and optional_space;\n"
740 "caretcaret\n"
741 " optional_space .and '^' .and '^' .and optional_space;\n"
742 "colon\n"
743 " optional_space .and ':' .and optional_space;\n"
744 "comma\n"
745 " optional_space .and ',' .and optional_space;\n"
746 "dot\n"
747 " optional_space .and '.' .and optional_space;\n"
748 "equals\n"
749 " optional_space .and '=' .and optional_space;\n"
750 "equalsequals\n"
751 " optional_space .and '=' .and '=' .and optional_space;\n"
752 "greater\n"
753 " optional_space .and '>' .and optional_space;\n"
754 "greaterequals\n"
755 " optional_space .and '>' .and '=' .and optional_space;\n"
756 "lbrace\n"
757 " optional_space .and '{' .and optional_space;\n"
758 "lbracket\n"
759 " optional_space .and '[' .and optional_space;\n"
760 "less\n"
761 " optional_space .and '<' .and optional_space;\n"
762 "lessequals\n"
763 " optional_space .and '<' .and '=' .and optional_space;\n"
764 "lparen\n"
765 " optional_space .and '(' .and optional_space;\n"
766 "minus\n"
767 " optional_space .and '-' .and optional_space;\n"
768 "minusequals\n"
769 " optional_space .and '-' .and '=' .and optional_space;\n"
770 "minusminus\n"
771 " optional_space .and '-' .and '-' .and optional_space;\n"
772 "plus\n"
773 " optional_space .and '+' .and optional_space;\n"
774 "plusequals\n"
775 " optional_space .and '+' .and '=' .and optional_space;\n"
776 "plusplus\n"
777 " optional_space .and '+' .and '+' .and optional_space;\n"
778 "question\n"
779 " optional_space .and '?' .and optional_space;\n"
780 "rbrace\n"
781 " optional_space .and '}' .and optional_space;\n"
782 "rbracket\n"
783 " optional_space .and ']' .and optional_space;\n"
784 "rparen\n"
785 " optional_space .and ')' .and optional_space;\n"
786 "semicolon\n"
787 " optional_space .and ';' .and optional_space;\n"
788 "slash\n"
789 " optional_space .and '/' .and optional_space;\n"
790 "slashequals\n"
791 " optional_space .and '/' .and '=' .and optional_space;\n"
792 "star\n"
793 " optional_space .and '*' .and optional_space;\n"
794 "starequals\n"
795 " optional_space .and '*' .and '=' .and optional_space;\n"
796 ".string string_lexer;\n"
797 "string_lexer\n"
798 " lex_first_identifier_character .and .loop lex_next_identifier_character;\n"
799 "lex_first_identifier_character\n"
800 " 'a'-'z' .or 'A'-'Z' .or '_';\n"
801 "lex_next_identifier_character\n"
802 " 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n"
803 "err_token\n"
804 " '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or\n"
805 " '-' .or '+' .or '=' .or '|' .or '\\\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '\"' .or\n"
806 " '\\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;\n"
807 "err_identifier\n"
808 " id_character_first .and .loop id_character_next;\n"
809 ""