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