Add syntax files for expression and directive preprocessor.
[mesa.git] / src / mesa / shader / slang / library / slang_pp_directives_syn.h
1
2 /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */
3
4 " \n"
5 " \n"
6 " \n"
7 " \n"
8 ".syntax source; \n"
9 " \n"
10 " \n"
11 " \n"
12 ".emtcode ESCAPE_TOKEN 0 \n"
13 " \n"
14 " \n"
15 ".emtcode TOKEN_END 0 \n"
16 ".emtcode TOKEN_DEFINE 1 \n"
17 ".emtcode TOKEN_UNDEF 2 \n"
18 ".emtcode TOKEN_IF 3 \n"
19 ".emtcode TOKEN_ELSE 4 \n"
20 ".emtcode TOKEN_ELIF 5 \n"
21 ".emtcode TOKEN_ENDIF 6 \n"
22 ".emtcode TOKEN_ERROR 7 \n"
23 ".emtcode TOKEN_PRAGMA 8 \n"
24 ".emtcode TOKEN_EXTENSION 9 \n"
25 ".emtcode TOKEN_LINE 10 \n"
26 " \n"
27 " \n"
28 ".emtcode PARAM_END 0 \n"
29 ".emtcode PARAM_PARAMETER 1 \n"
30 " \n"
31 " \n"
32 ".emtcode BEHAVIOR_REQUIRE 1 \n"
33 ".emtcode BEHAVIOR_ENABLE 2 \n"
34 ".emtcode BEHAVIOR_WARN 3 \n"
35 ".emtcode BEHAVIOR_DISABLE 4 \n"
36 " \n"
37 "source \n"
38 " optional_directive .and .loop source_element .and '\\0' .emit ESCAPE_TOKEN .emit TOKEN_END; \n"
39 " \n"
40 "source_element \n"
41 " c_style_comment_block .or cpp_style_comment_block .or new_line_directive .or source_token; \n"
42 " \n"
43 "c_style_comment_block \n"
44 " '/' .and '*' .and c_style_comment_rest .and .true .emit ' '; \n"
45 " \n"
46 "c_style_comment_rest \n"
47 " .loop c_style_comment_body .and c_style_comment_end; \n"
48 " \n"
49 "c_style_comment_body \n"
50 " c_style_comment_char_nostar .or c_style_comment_char_star_noslashstar; \n"
51 " \n"
52 "c_style_comment_char_nostar \n"
53 " new_line .or '\\x2B'-'\\xFF' .or '\\x01'-'\\x29'; \n"
54 " \n"
55 "c_style_comment_char_star_noslashstar \n"
56 " '*' .and c_style_comment_char_star_noslashstar_1; \n"
57 "c_style_comment_char_star_noslashstar_1 \n"
58 " c_style_comment_char_noslashstar .or c_style_comment_char_star_noslashstar; \n"
59 " \n"
60 "c_style_comment_char_noslashstar \n"
61 " new_line .or '\\x30'-'\\xFF' .or '\\x01'-'\\x29' .or '\\x2B'-'\\x2E'; \n"
62 " \n"
63 "c_style_comment_end \n"
64 " '*' .and .loop c_style_comment_char_star .and '/'; \n"
65 " \n"
66 "c_style_comment_char_star \n"
67 " '*'; \n"
68 " \n"
69 "cpp_style_comment_block \n"
70 " '/' .and '/' .and cpp_style_comment_block_1; \n"
71 "cpp_style_comment_block_1 \n"
72 " cpp_style_comment_block_2 .or cpp_style_comment_block_3; \n"
73 "cpp_style_comment_block_2 \n"
74 " .loop cpp_style_comment_char .and new_line_directive; \n"
75 "cpp_style_comment_block_3 \n"
76 " .loop cpp_style_comment_char; \n"
77 " \n"
78 "cpp_style_comment_char \n"
79 " '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C'; \n"
80 " \n"
81 "new_line_directive \n"
82 " new_line .and optional_directive; \n"
83 " \n"
84 "new_line \n"
85 " generic_new_line .emit '\\n'; \n"
86 " \n"
87 "generic_new_line \n"
88 " carriage_return_line_feed .or line_feed_carriage_return .or '\\n' .or '\\r'; \n"
89 " \n"
90 "carriage_return_line_feed \n"
91 " '\\r' .and '\\n'; \n"
92 " \n"
93 "line_feed_carriage_return \n"
94 " '\\n' .and '\\r'; \n"
95 " \n"
96 "optional_directive \n"
97 " directive .emit ESCAPE_TOKEN .or .true; \n"
98 " \n"
99 "directive \n"
100 " dir_define .emit TOKEN_DEFINE .or \n"
101 " dir_undef .emit TOKEN_UNDEF .or \n"
102 " dir_if .emit TOKEN_IF .or \n"
103 " dir_ifdef .emit TOKEN_IF .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' .emit 'd' \n"
104 " .emit ' ' .or \n"
105 " dir_ifndef .emit TOKEN_IF .emit '!' .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' \n"
106 " .emit 'd' .emit ' ' .or \n"
107 " dir_else .emit TOKEN_ELSE .or \n"
108 " dir_elif .emit TOKEN_ELIF .or \n"
109 " dir_endif .emit TOKEN_ENDIF .or \n"
110 " dir_ext .emit TOKEN_EXTENSION .or \n"
111 " dir_line .emit TOKEN_LINE; \n"
112 " \n"
113 "dir_define \n"
114 " optional_space .and '#' .and optional_space .and \"define\" .and symbol .and opt_parameters .and \n"
115 " definition; \n"
116 " \n"
117 "dir_undef \n"
118 " optional_space .and '#' .and optional_space .and \"undef\" .and symbol; \n"
119 " \n"
120 "dir_if \n"
121 " optional_space .and '#' .and optional_space .and \"if\" .and expression; \n"
122 " \n"
123 "dir_ifdef \n"
124 " optional_space .and '#' .and optional_space .and \"ifdef\" .and symbol; \n"
125 " \n"
126 "dir_ifndef \n"
127 " optional_space .and '#' .and optional_space .and \"ifndef\" .and symbol; \n"
128 " \n"
129 "dir_else \n"
130 " optional_space .and '#' .and optional_space .and \"else\"; \n"
131 " \n"
132 "dir_elif \n"
133 " optional_space .and '#' .and optional_space .and \"elif\" .and expression; \n"
134 " \n"
135 "dir_endif \n"
136 " optional_space .and '#' .and optional_space .and \"endif\"; \n"
137 " \n"
138 "dir_ext \n"
139 " optional_space .and '#' .and optional_space .and \"extension\" .and space .and extension_name .and \n"
140 " optional_space .and ':' .and optional_space .and extension_behavior; \n"
141 " \n"
142 "dir_line \n"
143 " optional_space .and '#' .and optional_space .and \"line\" .and expression; \n"
144 " \n"
145 "symbol \n"
146 " space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0'; \n"
147 " \n"
148 "opt_parameters \n"
149 " parameters .or .true .emit PARAM_END; \n"
150 " \n"
151 "parameters \n"
152 " '(' .and parameters_1 .and optional_space .and ')' .emit PARAM_END; \n"
153 "parameters_1 \n"
154 " parameters_2 .or .true; \n"
155 "parameters_2 \n"
156 " parameter .emit PARAM_PARAMETER .and .loop parameters_3; \n"
157 "parameters_3 \n"
158 " optional_space .and ',' .and parameter .emit PARAM_PARAMETER; \n"
159 " \n"
160 "parameter \n"
161 " optional_space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and \n"
162 " .true .emit '\\0'; \n"
163 " \n"
164 "definition \n"
165 " .loop definition_character .emit * .and .true .emit '\\0'; \n"
166 " \n"
167 "definition_character \n"
168 " '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C'; \n"
169 " \n"
170 "expression \n"
171 " expression_element .and .loop expression_element .and .true .emit '\\0'; \n"
172 " \n"
173 "expression_element \n"
174 " expression_character .emit *; \n"
175 " \n"
176 "expression_character \n"
177 " '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C'; \n"
178 " \n"
179 "extension_name \n"
180 " symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0'; \n"
181 " \n"
182 "extension_behavior \n"
183 " \"require\" .emit BEHAVIOR_REQUIRE .or \n"
184 " \"enable\" .emit BEHAVIOR_ENABLE .or \n"
185 " \"warn\" .emit BEHAVIOR_WARN .or \n"
186 " \"disable\" .emit BEHAVIOR_DISABLE; \n"
187 " \n"
188 "optional_space \n"
189 " .loop single_space; \n"
190 " \n"
191 "space \n"
192 " single_space .and .loop single_space; \n"
193 " \n"
194 "single_space \n"
195 " ' ' .or '\\t'; \n"
196 " \n"
197 "source_token \n"
198 " space .emit ' ' .or complex_token .or source_token_1; \n"
199 "source_token_1 \n"
200 " simple_token .emit ' ' .and .true .emit ' '; \n"
201 " \n"
202 " \n"
203 " \n"
204 "complex_token \n"
205 " identifier .or number; \n"
206 " \n"
207 "simple_token \n"
208 " increment .or decrement .or lequal .or gequal .or equal .or nequal .or and .or xor .or or .or \n"
209 " addto .or subtractfrom .or multiplyto .or divideto .or other; \n"
210 " \n"
211 "identifier \n"
212 " identifier_char1 .emit * .and .loop identifier_char2 .emit *; \n"
213 "identifier_char1 \n"
214 " 'a'-'z' .or 'A'-'Z' .or '_'; \n"
215 "identifier_char2 \n"
216 " 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_'; \n"
217 " \n"
218 "number \n"
219 " float .or integer; \n"
220 " \n"
221 "digit_oct \n"
222 " '0'-'7'; \n"
223 " \n"
224 "digit_dec \n"
225 " '0'-'9'; \n"
226 " \n"
227 "digit_hex \n"
228 " '0'-'9' .or 'A'-'F' .or 'a'-'f'; \n"
229 " \n"
230 "float \n"
231 " float_1 .or float_2; \n"
232 "float_1 \n"
233 " float_fractional_constant .and float_optional_exponent_part; \n"
234 "float_2 \n"
235 " float_digit_sequence .and float_exponent_part; \n"
236 " \n"
237 "float_fractional_constant \n"
238 " float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3; \n"
239 "float_fractional_constant_1 \n"
240 " float_digit_sequence .and '.' .emit '.' .and float_digit_sequence; \n"
241 "float_fractional_constant_2 \n"
242 " float_digit_sequence .and '.' .emit '.'; \n"
243 "float_fractional_constant_3 \n"
244 " '.' .emit '.' .and float_digit_sequence; \n"
245 " \n"
246 "float_optional_exponent_part \n"
247 " float_exponent_part .or .true; \n"
248 " \n"
249 "float_digit_sequence \n"
250 " digit_dec .emit * .and .loop digit_dec .emit *; \n"
251 " \n"
252 "float_exponent_part \n"
253 " float_exponent_part_1 .or float_exponent_part_2; \n"
254 "float_exponent_part_1 \n"
255 " 'e' .emit 'e' .and float_optional_sign .and float_digit_sequence; \n"
256 "float_exponent_part_2 \n"
257 " 'E' .emit 'E' .and float_optional_sign .and float_digit_sequence; \n"
258 " \n"
259 "float_optional_sign \n"
260 " '+' .emit '+' .or '-' .emit '-' .or .true; \n"
261 " \n"
262 "integer \n"
263 " integer_hex .or integer_oct .or integer_dec; \n"
264 " \n"
265 "integer_hex \n"
266 " '0' .emit '0' .and integer_hex_1 .emit * .and digit_hex .emit * .and \n"
267 " .loop digit_hex .emit *; \n"
268 "integer_hex_1 \n"
269 " 'x' .or 'X'; \n"
270 " \n"
271 "integer_oct \n"
272 " '0' .emit '0' .and .loop digit_oct .emit *; \n"
273 " \n"
274 "integer_dec \n"
275 " digit_dec .emit * .and .loop digit_dec .emit *; \n"
276 " \n"
277 "increment \n"
278 " '+' .emit * .and '+' .emit *; \n"
279 " \n"
280 "decrement \n"
281 " '-' .emit * .and '-' .emit *; \n"
282 " \n"
283 "lequal \n"
284 " '<' .emit * .and '=' .emit *; \n"
285 " \n"
286 "gequal \n"
287 " '>' .emit * .and '=' .emit *; \n"
288 " \n"
289 "equal \n"
290 " '=' .emit * .and '=' .emit *; \n"
291 " \n"
292 "nequal \n"
293 " '!' .emit * .and '=' .emit *; \n"
294 " \n"
295 "and \n"
296 " '&' .emit * .and '&' .emit *; \n"
297 " \n"
298 "xor \n"
299 " '^' .emit * .and '^' .emit *; \n"
300 " \n"
301 "or \n"
302 " '|' .emit * .and '|' .emit *; \n"
303 " \n"
304 "addto \n"
305 " '+' .emit * .and '=' .emit *; \n"
306 " \n"
307 "subtractfrom \n"
308 " '-' .emit * .and '=' .emit *; \n"
309 " \n"
310 "multiplyto \n"
311 " '*' .emit * .and '=' .emit *; \n"
312 " \n"
313 "divideto \n"
314 " '/' .emit * .and '=' .emit *; \n"
315 " \n"
316 " \n"
317 "other \n"
318 " '\\x24'-'\\xFF' .emit * .or '\\x01'-'\\x22' .emit *; \n"
319 " \n"
320 "symbol_character \n"
321 " 'A'-'Z' .or 'a'-'z' .or '_'; \n"
322 " \n"
323 "symbol_character2 \n"
324 " 'A'-'Z' .or 'a'-'z' .or '0'-'9' .or '_'; \n"
325 " \n"
326 ".string string_lexer; \n"
327 " \n"
328 "string_lexer \n"
329 " lex_first_identifier_character .and .loop lex_next_identifier_character; \n"
330 " \n"
331 "lex_first_identifier_character \n"
332 " 'a'-'z' .or 'A'-'Z' .or '_'; \n"
333 " \n"
334 "lex_next_identifier_character \n"
335 " 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_'; \n"
336 " \n"
337 ""