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