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