Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chromium_gensrc/mesa/glsl_lexer.cc

Issue 1380873002: Merged fix for memory leak from glsl_lexer.ll (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/mesa.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/glsl/glsl_lexer.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #line 2 "src/chromium_gensrc/mesa/glsl_lexer.cc" 1 #line 2 "src/chromium_gensrc/mesa/glsl_lexer.cc"
2 2
3 #line 4 "src/chromium_gensrc/mesa/glsl_lexer.cc" 3 #line 4 "src/chromium_gensrc/mesa/glsl_lexer.cc"
4 4
5 #define YY_INT_ALIGNED short int 5 #define YY_INT_ALIGNED short int
6 6
7 /* A lexical scanner generated by flex */ 7 /* A lexical scanner generated by flex */
8 8
9 #define FLEX_SCANNER 9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2 10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5 11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35 12 #define YY_FLEX_SUBMINOR_VERSION 39
13 #if YY_FLEX_SUBMINOR_VERSION > 0 13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA 14 #define FLEX_BETA
15 #endif 15 #endif
16 16
17 /* First, we deal with platform-specific or compiler-specific issues. */ 17 /* First, we deal with platform-specific or compiler-specific issues. */
18 18
19 /* begin standard C headers. */ 19 /* begin standard C headers. */
20 #include <stdio.h> 20 #include <stdio.h>
21 #include <string.h> 21 #include <string.h>
22 #include <errno.h> 22 #include <errno.h>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 /* The state buf must be large enough to hold one state per character in the mai n buffer. 173 /* The state buf must be large enough to hold one state per character in the mai n buffer.
174 */ 174 */
175 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 175 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
176 176
177 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 177 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
178 #define YY_TYPEDEF_YY_BUFFER_STATE 178 #define YY_TYPEDEF_YY_BUFFER_STATE
179 typedef struct yy_buffer_state *YY_BUFFER_STATE; 179 typedef struct yy_buffer_state *YY_BUFFER_STATE;
180 #endif 180 #endif
181 181
182 #ifndef YY_TYPEDEF_YY_SIZE_T
183 #define YY_TYPEDEF_YY_SIZE_T
184 typedef size_t yy_size_t;
Ken Russell (switch to Gerrit) 2015/09/30 20:49:15 Which version of flex/bison (or, at least, which o
David Yen 2015/09/30 21:26:06 I included it in the README.chromium file and also
Ken Russell (switch to Gerrit) 2015/09/30 21:28:01 Thanks.
185 #endif
186
182 #define EOB_ACT_CONTINUE_SCAN 0 187 #define EOB_ACT_CONTINUE_SCAN 0
183 #define EOB_ACT_END_OF_FILE 1 188 #define EOB_ACT_END_OF_FILE 1
184 #define EOB_ACT_LAST_MATCH 2 189 #define EOB_ACT_LAST_MATCH 2
185 190
186 #define YY_LESS_LINENO(n) 191 #define YY_LESS_LINENO(n)
192 #define YY_LINENO_REWIND_TO(ptr)
187 193
188 /* Return all but the first "n" matched characters back to the input stream. */ 194 /* Return all but the first "n" matched characters back to the input stream. */
189 #define yyless(n) \ 195 #define yyless(n) \
190 do \ 196 do \
191 { \ 197 { \
192 /* Undo effects of setting up yytext. */ \ 198 /* Undo effects of setting up yytext. */ \
193 int yyless_macro_arg = (n); \ 199 int yyless_macro_arg = (n); \
194 YY_LESS_LINENO(yyless_macro_arg);\ 200 YY_LESS_LINENO(yyless_macro_arg);\
195 *yy_cp = yyg->yy_hold_char; \ 201 *yy_cp = yyg->yy_hold_char; \
196 YY_RESTORE_YY_MORE_OFFSET \ 202 YY_RESTORE_YY_MORE_OFFSET \
197 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ ; \ 203 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ ; \
198 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 204 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
199 } \ 205 } \
200 while ( 0 ) 206 while ( 0 )
201 207
202 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) 208 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
203 209
204 #ifndef YY_TYPEDEF_YY_SIZE_T
205 #define YY_TYPEDEF_YY_SIZE_T
206 typedef size_t yy_size_t;
207 #endif
208
209 #ifndef YY_STRUCT_YY_BUFFER_STATE 210 #ifndef YY_STRUCT_YY_BUFFER_STATE
210 #define YY_STRUCT_YY_BUFFER_STATE 211 #define YY_STRUCT_YY_BUFFER_STATE
211 struct yy_buffer_state 212 struct yy_buffer_state
212 { 213 {
213 FILE *yy_input_file; 214 FILE *yy_input_file;
214 215
215 char *yy_ch_buf; /* input buffer */ 216 char *yy_ch_buf; /* input buffer */
216 char *yy_buf_pos; /* current position in input buffer */ 217 char *yy_buf_pos; /* current position in input buffer */
217 218
218 /* Size of input buffer in bytes, not including room for EOB 219 /* Size of input buffer in bytes, not including room for EOB
219 * characters. 220 * characters.
220 */ 221 */
221 yy_size_t yy_buf_size; 222 yy_size_t yy_buf_size;
222 223
223 /* Number of characters read into yy_ch_buf, not including EOB 224 /* Number of characters read into yy_ch_buf, not including EOB
224 * characters. 225 * characters.
225 */ 226 */
226 » int yy_n_chars; 227 » yy_size_t yy_n_chars;
227 228
228 /* Whether we "own" the buffer - i.e., we know we created it, 229 /* Whether we "own" the buffer - i.e., we know we created it,
229 * and can realloc() it to grow it, and should free() it to 230 * and can realloc() it to grow it, and should free() it to
230 * delete it. 231 * delete it.
231 */ 232 */
232 int yy_is_our_buffer; 233 int yy_is_our_buffer;
233 234
234 /* Whether this is an "interactive" input source; if so, and 235 /* Whether this is an "interactive" input source; if so, and
235 * if we're using stdio for input, then we want to use getc() 236 * if we're using stdio for input, then we want to use getc()
236 * instead of fread(), to make sure we stop fetching input after 237 * instead of fread(), to make sure we stop fetching input after
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner ); 296 void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner );
296 297
297 static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner ); 298 static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner );
298 static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner ); 299 static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner );
299 static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yysc anner ); 300 static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yysc anner );
300 301
301 #define YY_FLUSH_BUFFER _mesa_glsl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) 302 #define YY_FLUSH_BUFFER _mesa_glsl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
302 303
303 YY_BUFFER_STATE _mesa_glsl__scan_buffer (char *base,yy_size_t size ,yyscan_t yys canner ); 304 YY_BUFFER_STATE _mesa_glsl__scan_buffer (char *base,yy_size_t size ,yyscan_t yys canner );
304 YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char *yy_str ,yyscan_t yyscanne r ); 305 YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char *yy_str ,yyscan_t yyscanne r );
305 YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char *bytes,int len ,yyscan_t yy scanner ); 306 YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char *bytes,yy_size_t len ,yysca n_t yyscanner );
306 307
307 void *_mesa_glsl_alloc (yy_size_t ,yyscan_t yyscanner ); 308 void *_mesa_glsl_alloc (yy_size_t ,yyscan_t yyscanner );
308 void *_mesa_glsl_realloc (void *,yy_size_t ,yyscan_t yyscanner ); 309 void *_mesa_glsl_realloc (void *,yy_size_t ,yyscan_t yyscanner );
309 void _mesa_glsl_free (void * ,yyscan_t yyscanner ); 310 void _mesa_glsl_free (void * ,yyscan_t yyscanner );
310 311
311 #define yy_new_buffer _mesa_glsl__create_buffer 312 #define yy_new_buffer _mesa_glsl__create_buffer
312 313
313 #define yy_set_interactive(is_interactive) \ 314 #define yy_set_interactive(is_interactive) \
314 { \ 315 { \
315 if ( ! YY_CURRENT_BUFFER ){ \ 316 if ( ! YY_CURRENT_BUFFER ){ \
(...skipping 11 matching lines...) Expand all
327 YY_CURRENT_BUFFER_LVALUE = \ 328 YY_CURRENT_BUFFER_LVALUE = \
328 _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ 329 _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
329 } \ 330 } \
330 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 331 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
331 } 332 }
332 333
333 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 334 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
334 335
335 /* Begin user sect3 */ 336 /* Begin user sect3 */
336 337
337 #define _mesa_glsl_wrap(n) 1 338 #define _mesa_glsl_wrap(yyscanner) 1
338 #define YY_SKIP_YYWRAP 339 #define YY_SKIP_YYWRAP
339 340
340 typedef unsigned char YY_CHAR; 341 typedef unsigned char YY_CHAR;
341 342
342 typedef int yy_state_type; 343 typedef int yy_state_type;
343 344
344 #define yytext_ptr yytext_r 345 #define yytext_ptr yytext_r
345 346
346 static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); 347 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
347 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yy scanner); 348 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yy scanner);
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 */ 1077 */
1077 #define KEYWORD(reserved_version, allowed_version, token) \ 1078 #define KEYWORD(reserved_version, allowed_version, token) \
1078 do { \ 1079 do { \
1079 if (yyextra->language_version >= allowed_version) { \ 1080 if (yyextra->language_version >= allowed_version) { \
1080 return token; \ 1081 return token; \
1081 } else if (yyextra->language_version >= reserved_version) { \ 1082 } else if (yyextra->language_version >= reserved_version) { \
1082 _mesa_glsl_error(yylloc, yyextra, \ 1083 _mesa_glsl_error(yylloc, yyextra, \
1083 "Illegal use of reserved word `%s'", yytext); \ 1084 "Illegal use of reserved word `%s'", yytext); \
1084 return ERROR_TOK; \ 1085 return ERROR_TOK; \
1085 } else { \ 1086 } else { \
1086 » yylval->identifier = strdup(yytext);» » » » \ 1087 » void *mem_ctx = yyextra;» » » » » \
1088 » yylval->identifier = ralloc_strdup(mem_ctx, yytext);» » \
1087 return classify_identifier(yyextra, yytext); \ 1089 return classify_identifier(yyextra, yytext); \
1088 } \ 1090 } \
1089 } while (0) 1091 } while (0)
1090 1092
1091 /* The ES macro can be used in KEYWORD checks: 1093 /* The ES macro can be used in KEYWORD checks:
1092 * 1094 *
1093 * word KEYWORD(110 || ES, 400, TOKEN) 1095 * word KEYWORD(110 || ES, 400, TOKEN)
1094 * ...means the word is reserved in GLSL ES 1.00, while 1096 * ...means the word is reserved in GLSL ES 1.00, while
1095 * 1097 *
1096 * word KEYWORD(110, 130 || ES, TOKEN) 1098 * word KEYWORD(110, 130 || ES, TOKEN)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 "Signed literal value `%s' is interpreted as %d", 1138 "Signed literal value `%s' is interpreted as %d",
1137 text, lval->n); 1139 text, lval->n);
1138 } 1140 }
1139 return is_uint ? UINTCONSTANT : INTCONSTANT; 1141 return is_uint ? UINTCONSTANT : INTCONSTANT;
1140 } 1142 }
1141 1143
1142 #define LITERAL_INTEGER(base) \ 1144 #define LITERAL_INTEGER(base) \
1143 literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base) 1145 literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base)
1144 1146
1145 1147
1146 #line 1147 "src/chromium_gensrc/mesa/glsl_lexer.cc" 1148 #line 1149 "src/chromium_gensrc/mesa/glsl_lexer.cc"
1147 1149
1148 #define INITIAL 0 1150 #define INITIAL 0
1149 #define PP 1 1151 #define PP 1
1150 #define PRAGMA 2 1152 #define PRAGMA 2
1151 1153
1152 #define YY_EXTRA_TYPE struct _mesa_glsl_parse_state * 1154 #define YY_EXTRA_TYPE struct _mesa_glsl_parse_state *
1153 1155
1154 /* Holds the entire state of the reentrant scanner. */ 1156 /* Holds the entire state of the reentrant scanner. */
1155 struct yyguts_t 1157 struct yyguts_t
1156 { 1158 {
1157 1159
1158 /* User-defined. Not touched by flex. */ 1160 /* User-defined. Not touched by flex. */
1159 YY_EXTRA_TYPE yyextra_r; 1161 YY_EXTRA_TYPE yyextra_r;
1160 1162
1161 /* The rest are the same as the globals declared in the non-reentrant scanne r. */ 1163 /* The rest are the same as the globals declared in the non-reentrant scanne r. */
1162 FILE *yyin_r, *yyout_r; 1164 FILE *yyin_r, *yyout_r;
1163 size_t yy_buffer_stack_top; /**< index of top of stack. */ 1165 size_t yy_buffer_stack_top; /**< index of top of stack. */
1164 size_t yy_buffer_stack_max; /**< capacity of stack. */ 1166 size_t yy_buffer_stack_max; /**< capacity of stack. */
1165 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ 1167 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1166 char yy_hold_char; 1168 char yy_hold_char;
1167 int yy_n_chars; 1169 yy_size_t yy_n_chars;
1168 int yyleng_r; 1170 yy_size_t yyleng_r;
1169 char *yy_c_buf_p; 1171 char *yy_c_buf_p;
1170 int yy_init; 1172 int yy_init;
1171 int yy_start; 1173 int yy_start;
1172 int yy_did_buffer_switch_on_eof; 1174 int yy_did_buffer_switch_on_eof;
1173 int yy_start_stack_ptr; 1175 int yy_start_stack_ptr;
1174 int yy_start_stack_depth; 1176 int yy_start_stack_depth;
1175 int *yy_start_stack; 1177 int *yy_start_stack;
1176 yy_state_type yy_last_accepting_state; 1178 yy_state_type yy_last_accepting_state;
1177 char* yy_last_accepting_cpos; 1179 char* yy_last_accepting_cpos;
1178 1180
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); 1217 void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
1216 1218
1217 FILE *_mesa_glsl_get_in (yyscan_t yyscanner ); 1219 FILE *_mesa_glsl_get_in (yyscan_t yyscanner );
1218 1220
1219 void _mesa_glsl_set_in (FILE * in_str ,yyscan_t yyscanner ); 1221 void _mesa_glsl_set_in (FILE * in_str ,yyscan_t yyscanner );
1220 1222
1221 FILE *_mesa_glsl_get_out (yyscan_t yyscanner ); 1223 FILE *_mesa_glsl_get_out (yyscan_t yyscanner );
1222 1224
1223 void _mesa_glsl_set_out (FILE * out_str ,yyscan_t yyscanner ); 1225 void _mesa_glsl_set_out (FILE * out_str ,yyscan_t yyscanner );
1224 1226
1225 int _mesa_glsl_get_leng (yyscan_t yyscanner ); 1227 yy_size_t _mesa_glsl_get_leng (yyscan_t yyscanner );
1226 1228
1227 char *_mesa_glsl_get_text (yyscan_t yyscanner ); 1229 char *_mesa_glsl_get_text (yyscan_t yyscanner );
1228 1230
1229 int _mesa_glsl_get_lineno (yyscan_t yyscanner ); 1231 int _mesa_glsl_get_lineno (yyscan_t yyscanner );
1230 1232
1231 void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner ); 1233 void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner );
1232 1234
1235 int _mesa_glsl_get_column (yyscan_t yyscanner );
1236
1237 void _mesa_glsl_set_column (int column_no ,yyscan_t yyscanner );
1238
1233 YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner ); 1239 YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner );
1234 1240
1235 void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); 1241 void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
1236 1242
1237 YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner ); 1243 YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner );
1238 1244
1239 void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); 1245 void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
1240 1246
1241 /* Macros after this point can all be overridden by user definitions in 1247 /* Macros after this point can all be overridden by user definitions in
1242 * section 1. 1248 * section 1.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 1381
1376 /** The main scanner function which does all the work. 1382 /** The main scanner function which does all the work.
1377 */ 1383 */
1378 YY_DECL 1384 YY_DECL
1379 { 1385 {
1380 register yy_state_type yy_current_state; 1386 register yy_state_type yy_current_state;
1381 register char *yy_cp, *yy_bp; 1387 register char *yy_cp, *yy_bp;
1382 register int yy_act; 1388 register int yy_act;
1383 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 1389 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1384 1390
1385 #line 145 "src/src/glsl/glsl_lexer.ll"
1386
1387
1388 #line 1389 "src/chromium_gensrc/mesa/glsl_lexer.cc"
1389
1390 yylval = yylval_param; 1391 yylval = yylval_param;
1391 1392
1392 yylloc = yylloc_param; 1393 yylloc = yylloc_param;
1393 1394
1394 if ( !yyg->yy_init ) 1395 if ( !yyg->yy_init )
1395 { 1396 {
1396 yyg->yy_init = 1; 1397 yyg->yy_init = 1;
1397 1398
1398 #ifdef YY_USER_INIT 1399 #ifdef YY_USER_INIT
1399 YY_USER_INIT; 1400 YY_USER_INIT;
(...skipping 10 matching lines...) Expand all
1410 1411
1411 if ( ! YY_CURRENT_BUFFER ) { 1412 if ( ! YY_CURRENT_BUFFER ) {
1412 _mesa_glsl_ensure_buffer_stack (yyscanner); 1413 _mesa_glsl_ensure_buffer_stack (yyscanner);
1413 YY_CURRENT_BUFFER_LVALUE = 1414 YY_CURRENT_BUFFER_LVALUE =
1414 _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yysc anner); 1415 _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yysc anner);
1415 } 1416 }
1416 1417
1417 _mesa_glsl__load_buffer_state(yyscanner ); 1418 _mesa_glsl__load_buffer_state(yyscanner );
1418 } 1419 }
1419 1420
1421 {
1422 #line 146 "src/src/glsl/glsl_lexer.ll"
1423
1424
1425 #line 1426 "src/chromium_gensrc/mesa/glsl_lexer.cc"
1426
1420 while ( 1 ) /* loops until end-of-file is reached */ 1427 while ( 1 ) /* loops until end-of-file is reached */
1421 { 1428 {
1422 yy_cp = yyg->yy_c_buf_p; 1429 yy_cp = yyg->yy_c_buf_p;
1423 1430
1424 /* Support of yytext. */ 1431 /* Support of yytext. */
1425 *yy_cp = yyg->yy_hold_char; 1432 *yy_cp = yyg->yy_hold_char;
1426 1433
1427 /* yy_bp points to the position in yy_ch_buf of the start of 1434 /* yy_bp points to the position in yy_ch_buf of the start of
1428 * the current run. 1435 * the current run.
1429 */ 1436 */
1430 yy_bp = yy_cp; 1437 yy_bp = yy_cp;
1431 1438
1432 yy_current_state = yyg->yy_start; 1439 yy_current_state = yyg->yy_start;
1433 yy_current_state += YY_AT_BOL(); 1440 yy_current_state += YY_AT_BOL();
1434 yy_match: 1441 yy_match:
1435 do 1442 do
1436 { 1443 {
1437 » » » register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 1444 » » » register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1438 if ( yy_accept[yy_current_state] ) 1445 if ( yy_accept[yy_current_state] )
1439 { 1446 {
1440 yyg->yy_last_accepting_state = yy_current_state; 1447 yyg->yy_last_accepting_state = yy_current_state;
1441 yyg->yy_last_accepting_cpos = yy_cp; 1448 yyg->yy_last_accepting_cpos = yy_cp;
1442 } 1449 }
1443 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_c urrent_state ) 1450 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_c urrent_state )
1444 { 1451 {
1445 yy_current_state = (int) yy_def[yy_current_state ]; 1452 yy_current_state = (int) yy_def[yy_current_state ];
1446 if ( yy_current_state >= 867 ) 1453 if ( yy_current_state >= 867 )
1447 yy_c = yy_meta[(unsigned int) yy_c]; 1454 yy_c = yy_meta[(unsigned int) yy_c];
(...skipping 16 matching lines...) Expand all
1464 { /* beginning of action switch */ 1471 { /* beginning of action switch */
1465 case 0: /* must back up */ 1472 case 0: /* must back up */
1466 /* undo the effects of YY_DO_BEFORE_ACTION */ 1473 /* undo the effects of YY_DO_BEFORE_ACTION */
1467 *yy_cp = yyg->yy_hold_char; 1474 *yy_cp = yyg->yy_hold_char;
1468 yy_cp = yyg->yy_last_accepting_cpos; 1475 yy_cp = yyg->yy_last_accepting_cpos;
1469 yy_current_state = yyg->yy_last_accepting_state; 1476 yy_current_state = yyg->yy_last_accepting_state;
1470 goto yy_find_action; 1477 goto yy_find_action;
1471 1478
1472 case 1: 1479 case 1:
1473 YY_RULE_SETUP 1480 YY_RULE_SETUP
1474 #line 147 "src/src/glsl/glsl_lexer.ll" 1481 #line 148 "src/src/glsl/glsl_lexer.ll"
1475 ; 1482 ;
1476 YY_BREAK 1483 YY_BREAK
1477 /* Preprocessor tokens. */ 1484 /* Preprocessor tokens. */
1478 case 2: 1485 case 2:
1479 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ 1486 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1480 yyg->yy_c_buf_p = yy_cp -= 1; 1487 yyg->yy_c_buf_p = yy_cp -= 1;
1481 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1488 YY_DO_BEFORE_ACTION; /* set up yytext again */
1482 YY_RULE_SETUP 1489 YY_RULE_SETUP
1483 #line 150 "src/src/glsl/glsl_lexer.ll" 1490 #line 151 "src/src/glsl/glsl_lexer.ll"
1484 ; 1491 ;
1485 YY_BREAK 1492 YY_BREAK
1486 case 3: 1493 case 3:
1487 YY_RULE_SETUP 1494 YY_RULE_SETUP
1488 #line 151 "src/src/glsl/glsl_lexer.ll" 1495 #line 152 "src/src/glsl/glsl_lexer.ll"
1489 { BEGIN PP; return VERSION_TOK; } 1496 { BEGIN PP; return VERSION_TOK; }
1490 YY_BREAK 1497 YY_BREAK
1491 case 4: 1498 case 4:
1492 YY_RULE_SETUP 1499 YY_RULE_SETUP
1493 #line 152 "src/src/glsl/glsl_lexer.ll" 1500 #line 153 "src/src/glsl/glsl_lexer.ll"
1494 { BEGIN PP; return EXTENSION; } 1501 { BEGIN PP; return EXTENSION; }
1495 YY_BREAK 1502 YY_BREAK
1496 case 5: 1503 case 5:
1497 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ 1504 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1498 yyg->yy_c_buf_p = yy_cp -= 1; 1505 yyg->yy_c_buf_p = yy_cp -= 1;
1499 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1506 YY_DO_BEFORE_ACTION; /* set up yytext again */
1500 YY_RULE_SETUP 1507 YY_RULE_SETUP
1501 #line 153 "src/src/glsl/glsl_lexer.ll" 1508 #line 154 "src/src/glsl/glsl_lexer.ll"
1502 { 1509 {
1503 /* Eat characters until the first digit is 1510 /* Eat characters until the first digit is
1504 * encountered 1511 * encountered
1505 */ 1512 */
1506 char *ptr = yytext; 1513 char *ptr = yytext;
1507 while (!isdigit(*ptr)) 1514 while (!isdigit(*ptr))
1508 ptr++; 1515 ptr++;
1509 1516
1510 /* Subtract one from the line number because 1517 /* Subtract one from the line number because
1511 * yylineno is zero-based instead of 1518 * yylineno is zero-based instead of
1512 * one-based. 1519 * one-based.
1513 */ 1520 */
1514 yylineno = strtol(ptr, &ptr, 0) - 1; 1521 yylineno = strtol(ptr, &ptr, 0) - 1;
1515 yylloc->source = strtol(ptr, NULL, 0); 1522 yylloc->source = strtol(ptr, NULL, 0);
1516 } 1523 }
1517 YY_BREAK 1524 YY_BREAK
1518 case 6: 1525 case 6:
1519 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ 1526 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1520 yyg->yy_c_buf_p = yy_cp -= 1; 1527 yyg->yy_c_buf_p = yy_cp -= 1;
1521 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1528 YY_DO_BEFORE_ACTION; /* set up yytext again */
1522 YY_RULE_SETUP 1529 YY_RULE_SETUP
1523 #line 168 "src/src/glsl/glsl_lexer.ll" 1530 #line 169 "src/src/glsl/glsl_lexer.ll"
1524 { 1531 {
1525 /* Eat characters until the first digit is 1532 /* Eat characters until the first digit is
1526 * encountered 1533 * encountered
1527 */ 1534 */
1528 char *ptr = yytext; 1535 char *ptr = yytext;
1529 while (!isdigit(*ptr)) 1536 while (!isdigit(*ptr))
1530 ptr++; 1537 ptr++;
1531 1538
1532 /* Subtract one from the line number because 1539 /* Subtract one from the line number because
1533 * yylineno is zero-based instead of 1540 * yylineno is zero-based instead of
1534 * one-based. 1541 * one-based.
1535 */ 1542 */
1536 yylineno = strtol(ptr, &ptr, 0) - 1; 1543 yylineno = strtol(ptr, &ptr, 0) - 1;
1537 } 1544 }
1538 YY_BREAK 1545 YY_BREAK
1539 case 7: 1546 case 7:
1540 YY_RULE_SETUP 1547 YY_RULE_SETUP
1541 #line 182 "src/src/glsl/glsl_lexer.ll" 1548 #line 183 "src/src/glsl/glsl_lexer.ll"
1542 { 1549 {
1543 BEGIN PP; 1550 BEGIN PP;
1544 return PRAGMA_DEBUG_ON; 1551 return PRAGMA_DEBUG_ON;
1545 } 1552 }
1546 YY_BREAK 1553 YY_BREAK
1547 case 8: 1554 case 8:
1548 YY_RULE_SETUP 1555 YY_RULE_SETUP
1549 #line 186 "src/src/glsl/glsl_lexer.ll" 1556 #line 187 "src/src/glsl/glsl_lexer.ll"
1550 { 1557 {
1551 BEGIN PP; 1558 BEGIN PP;
1552 return PRAGMA_DEBUG_OFF; 1559 return PRAGMA_DEBUG_OFF;
1553 } 1560 }
1554 YY_BREAK 1561 YY_BREAK
1555 case 9: 1562 case 9:
1556 YY_RULE_SETUP 1563 YY_RULE_SETUP
1557 #line 190 "src/src/glsl/glsl_lexer.ll" 1564 #line 191 "src/src/glsl/glsl_lexer.ll"
1558 { 1565 {
1559 BEGIN PP; 1566 BEGIN PP;
1560 return PRAGMA_OPTIMIZE_ON; 1567 return PRAGMA_OPTIMIZE_ON;
1561 } 1568 }
1562 YY_BREAK 1569 YY_BREAK
1563 case 10: 1570 case 10:
1564 YY_RULE_SETUP 1571 YY_RULE_SETUP
1565 #line 194 "src/src/glsl/glsl_lexer.ll" 1572 #line 195 "src/src/glsl/glsl_lexer.ll"
1566 { 1573 {
1567 BEGIN PP; 1574 BEGIN PP;
1568 return PRAGMA_OPTIMIZE_OFF; 1575 return PRAGMA_OPTIMIZE_OFF;
1569 } 1576 }
1570 YY_BREAK 1577 YY_BREAK
1571 case 11: 1578 case 11:
1572 YY_RULE_SETUP 1579 YY_RULE_SETUP
1573 #line 198 "src/src/glsl/glsl_lexer.ll" 1580 #line 199 "src/src/glsl/glsl_lexer.ll"
1574 { 1581 {
1575 BEGIN PP; 1582 BEGIN PP;
1576 return PRAGMA_INVARIANT_ALL; 1583 return PRAGMA_INVARIANT_ALL;
1577 } 1584 }
1578 YY_BREAK 1585 YY_BREAK
1579 case 12: 1586 case 12:
1580 YY_RULE_SETUP 1587 YY_RULE_SETUP
1581 #line 202 "src/src/glsl/glsl_lexer.ll" 1588 #line 203 "src/src/glsl/glsl_lexer.ll"
1582 { BEGIN PRAGMA; } 1589 { BEGIN PRAGMA; }
1583 YY_BREAK 1590 YY_BREAK
1584 case 13: 1591 case 13:
1585 /* rule 13 can match eol */ 1592 /* rule 13 can match eol */
1586 YY_RULE_SETUP 1593 YY_RULE_SETUP
1587 #line 204 "src/src/glsl/glsl_lexer.ll" 1594 #line 205 "src/src/glsl/glsl_lexer.ll"
1588 { BEGIN 0; yylineno++; yycolumn = 0; } 1595 { BEGIN 0; yylineno++; yycolumn = 0; }
1589 YY_BREAK 1596 YY_BREAK
1590 case 14: 1597 case 14:
1591 YY_RULE_SETUP 1598 YY_RULE_SETUP
1592 #line 205 "src/src/glsl/glsl_lexer.ll" 1599 #line 206 "src/src/glsl/glsl_lexer.ll"
1593 { } 1600 { }
1594 YY_BREAK 1601 YY_BREAK
1595 case 15: 1602 case 15:
1596 YY_RULE_SETUP 1603 YY_RULE_SETUP
1597 #line 207 "src/src/glsl/glsl_lexer.ll" 1604 #line 208 "src/src/glsl/glsl_lexer.ll"
1598 { } 1605 { }
1599 YY_BREAK 1606 YY_BREAK
1600 case 16: 1607 case 16:
1601 YY_RULE_SETUP 1608 YY_RULE_SETUP
1602 #line 208 "src/src/glsl/glsl_lexer.ll" 1609 #line 209 "src/src/glsl/glsl_lexer.ll"
1603 { } 1610 { }
1604 YY_BREAK 1611 YY_BREAK
1605 case 17: 1612 case 17:
1606 YY_RULE_SETUP 1613 YY_RULE_SETUP
1607 #line 209 "src/src/glsl/glsl_lexer.ll" 1614 #line 210 "src/src/glsl/glsl_lexer.ll"
1608 return COLON; 1615 return COLON;
1609 YY_BREAK 1616 YY_BREAK
1610 case 18: 1617 case 18:
1611 YY_RULE_SETUP 1618 YY_RULE_SETUP
1612 #line 210 "src/src/glsl/glsl_lexer.ll" 1619 #line 211 "src/src/glsl/glsl_lexer.ll"
1613 { 1620 {
1614 » » » » yylval->identifier = strdup(yytext); 1621 » » » » void *mem_ctx = yyextra;
1622 » » » » yylval->identifier = ralloc_strdup(mem_ctx, y ytext);
1615 return IDENTIFIER; 1623 return IDENTIFIER;
1616 } 1624 }
1617 YY_BREAK 1625 YY_BREAK
1618 case 19: 1626 case 19:
1619 YY_RULE_SETUP 1627 YY_RULE_SETUP
1620 #line 214 "src/src/glsl/glsl_lexer.ll" 1628 #line 216 "src/src/glsl/glsl_lexer.ll"
1621 { 1629 {
1622 yylval->n = strtol(yytext, NULL, 10); 1630 yylval->n = strtol(yytext, NULL, 10);
1623 return INTCONSTANT; 1631 return INTCONSTANT;
1624 } 1632 }
1625 YY_BREAK 1633 YY_BREAK
1626 case 20: 1634 case 20:
1627 /* rule 20 can match eol */ 1635 /* rule 20 can match eol */
1628 YY_RULE_SETUP 1636 YY_RULE_SETUP
1629 #line 218 "src/src/glsl/glsl_lexer.ll" 1637 #line 220 "src/src/glsl/glsl_lexer.ll"
1630 { BEGIN 0; yylineno++; yycolumn = 0; return EOL; } 1638 { BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
1631 YY_BREAK 1639 YY_BREAK
1632 case 21: 1640 case 21:
1633 /* rule 21 can match eol */ 1641 /* rule 21 can match eol */
1634 YY_RULE_SETUP 1642 YY_RULE_SETUP
1635 #line 220 "src/src/glsl/glsl_lexer.ll" 1643 #line 222 "src/src/glsl/glsl_lexer.ll"
1636 { yylineno++; yycolumn = 0; } 1644 { yylineno++; yycolumn = 0; }
1637 YY_BREAK 1645 YY_BREAK
1638 case 22: 1646 case 22:
1639 YY_RULE_SETUP 1647 YY_RULE_SETUP
1640 #line 222 "src/src/glsl/glsl_lexer.ll" 1648 #line 224 "src/src/glsl/glsl_lexer.ll"
1641 return ATTRIBUTE; 1649 return ATTRIBUTE;
1642 YY_BREAK 1650 YY_BREAK
1643 case 23: 1651 case 23:
1644 YY_RULE_SETUP 1652 YY_RULE_SETUP
1645 #line 223 "src/src/glsl/glsl_lexer.ll" 1653 #line 225 "src/src/glsl/glsl_lexer.ll"
1646 return CONST_TOK; 1654 return CONST_TOK;
1647 YY_BREAK 1655 YY_BREAK
1648 case 24: 1656 case 24:
1649 YY_RULE_SETUP 1657 YY_RULE_SETUP
1650 #line 224 "src/src/glsl/glsl_lexer.ll" 1658 #line 226 "src/src/glsl/glsl_lexer.ll"
1651 return BOOL_TOK; 1659 return BOOL_TOK;
1652 YY_BREAK 1660 YY_BREAK
1653 case 25: 1661 case 25:
1654 YY_RULE_SETUP 1662 YY_RULE_SETUP
1655 #line 225 "src/src/glsl/glsl_lexer.ll" 1663 #line 227 "src/src/glsl/glsl_lexer.ll"
1656 return FLOAT_TOK; 1664 return FLOAT_TOK;
1657 YY_BREAK 1665 YY_BREAK
1658 case 26: 1666 case 26:
1659 YY_RULE_SETUP 1667 YY_RULE_SETUP
1660 #line 226 "src/src/glsl/glsl_lexer.ll" 1668 #line 228 "src/src/glsl/glsl_lexer.ll"
1661 return INT_TOK; 1669 return INT_TOK;
1662 YY_BREAK 1670 YY_BREAK
1663 case 27: 1671 case 27:
1664 YY_RULE_SETUP 1672 YY_RULE_SETUP
1665 #line 227 "src/src/glsl/glsl_lexer.ll" 1673 #line 229 "src/src/glsl/glsl_lexer.ll"
1666 KEYWORD(130, 130, UINT_TOK); 1674 KEYWORD(130, 130, UINT_TOK);
1667 YY_BREAK 1675 YY_BREAK
1668 case 28: 1676 case 28:
1669 YY_RULE_SETUP 1677 YY_RULE_SETUP
1670 #line 229 "src/src/glsl/glsl_lexer.ll" 1678 #line 231 "src/src/glsl/glsl_lexer.ll"
1671 return BREAK; 1679 return BREAK;
1672 YY_BREAK 1680 YY_BREAK
1673 case 29: 1681 case 29:
1674 YY_RULE_SETUP 1682 YY_RULE_SETUP
1675 #line 230 "src/src/glsl/glsl_lexer.ll" 1683 #line 232 "src/src/glsl/glsl_lexer.ll"
1676 return CONTINUE; 1684 return CONTINUE;
1677 YY_BREAK 1685 YY_BREAK
1678 case 30: 1686 case 30:
1679 YY_RULE_SETUP 1687 YY_RULE_SETUP
1680 #line 231 "src/src/glsl/glsl_lexer.ll" 1688 #line 233 "src/src/glsl/glsl_lexer.ll"
1681 return DO; 1689 return DO;
1682 YY_BREAK 1690 YY_BREAK
1683 case 31: 1691 case 31:
1684 YY_RULE_SETUP 1692 YY_RULE_SETUP
1685 #line 232 "src/src/glsl/glsl_lexer.ll" 1693 #line 234 "src/src/glsl/glsl_lexer.ll"
1686 return WHILE; 1694 return WHILE;
1687 YY_BREAK 1695 YY_BREAK
1688 case 32: 1696 case 32:
1689 YY_RULE_SETUP 1697 YY_RULE_SETUP
1690 #line 233 "src/src/glsl/glsl_lexer.ll" 1698 #line 235 "src/src/glsl/glsl_lexer.ll"
1691 return ELSE; 1699 return ELSE;
1692 YY_BREAK 1700 YY_BREAK
1693 case 33: 1701 case 33:
1694 YY_RULE_SETUP 1702 YY_RULE_SETUP
1695 #line 234 "src/src/glsl/glsl_lexer.ll" 1703 #line 236 "src/src/glsl/glsl_lexer.ll"
1696 return FOR; 1704 return FOR;
1697 YY_BREAK 1705 YY_BREAK
1698 case 34: 1706 case 34:
1699 YY_RULE_SETUP 1707 YY_RULE_SETUP
1700 #line 235 "src/src/glsl/glsl_lexer.ll" 1708 #line 237 "src/src/glsl/glsl_lexer.ll"
1701 return IF; 1709 return IF;
1702 YY_BREAK 1710 YY_BREAK
1703 case 35: 1711 case 35:
1704 YY_RULE_SETUP 1712 YY_RULE_SETUP
1705 #line 236 "src/src/glsl/glsl_lexer.ll" 1713 #line 238 "src/src/glsl/glsl_lexer.ll"
1706 return DISCARD; 1714 return DISCARD;
1707 YY_BREAK 1715 YY_BREAK
1708 case 36: 1716 case 36:
1709 YY_RULE_SETUP 1717 YY_RULE_SETUP
1710 #line 237 "src/src/glsl/glsl_lexer.ll" 1718 #line 239 "src/src/glsl/glsl_lexer.ll"
1711 return RETURN; 1719 return RETURN;
1712 YY_BREAK 1720 YY_BREAK
1713 case 37: 1721 case 37:
1714 YY_RULE_SETUP 1722 YY_RULE_SETUP
1715 #line 239 "src/src/glsl/glsl_lexer.ll" 1723 #line 241 "src/src/glsl/glsl_lexer.ll"
1716 return BVEC2; 1724 return BVEC2;
1717 YY_BREAK 1725 YY_BREAK
1718 case 38: 1726 case 38:
1719 YY_RULE_SETUP 1727 YY_RULE_SETUP
1720 #line 240 "src/src/glsl/glsl_lexer.ll" 1728 #line 242 "src/src/glsl/glsl_lexer.ll"
1721 return BVEC3; 1729 return BVEC3;
1722 YY_BREAK 1730 YY_BREAK
1723 case 39: 1731 case 39:
1724 YY_RULE_SETUP 1732 YY_RULE_SETUP
1725 #line 241 "src/src/glsl/glsl_lexer.ll" 1733 #line 243 "src/src/glsl/glsl_lexer.ll"
1726 return BVEC4; 1734 return BVEC4;
1727 YY_BREAK 1735 YY_BREAK
1728 case 40: 1736 case 40:
1729 YY_RULE_SETUP 1737 YY_RULE_SETUP
1730 #line 242 "src/src/glsl/glsl_lexer.ll" 1738 #line 244 "src/src/glsl/glsl_lexer.ll"
1731 return IVEC2; 1739 return IVEC2;
1732 YY_BREAK 1740 YY_BREAK
1733 case 41: 1741 case 41:
1734 YY_RULE_SETUP 1742 YY_RULE_SETUP
1735 #line 243 "src/src/glsl/glsl_lexer.ll" 1743 #line 245 "src/src/glsl/glsl_lexer.ll"
1736 return IVEC3; 1744 return IVEC3;
1737 YY_BREAK 1745 YY_BREAK
1738 case 42: 1746 case 42:
1739 YY_RULE_SETUP 1747 YY_RULE_SETUP
1740 #line 244 "src/src/glsl/glsl_lexer.ll" 1748 #line 246 "src/src/glsl/glsl_lexer.ll"
1741 return IVEC4; 1749 return IVEC4;
1742 YY_BREAK 1750 YY_BREAK
1743 case 43: 1751 case 43:
1744 YY_RULE_SETUP 1752 YY_RULE_SETUP
1745 #line 245 "src/src/glsl/glsl_lexer.ll" 1753 #line 247 "src/src/glsl/glsl_lexer.ll"
1746 KEYWORD(130, 130, UVEC2); 1754 KEYWORD(130, 130, UVEC2);
1747 YY_BREAK 1755 YY_BREAK
1748 case 44: 1756 case 44:
1749 YY_RULE_SETUP 1757 YY_RULE_SETUP
1750 #line 246 "src/src/glsl/glsl_lexer.ll" 1758 #line 248 "src/src/glsl/glsl_lexer.ll"
1751 KEYWORD(130, 130, UVEC3); 1759 KEYWORD(130, 130, UVEC3);
1752 YY_BREAK 1760 YY_BREAK
1753 case 45: 1761 case 45:
1754 YY_RULE_SETUP 1762 YY_RULE_SETUP
1755 #line 247 "src/src/glsl/glsl_lexer.ll" 1763 #line 249 "src/src/glsl/glsl_lexer.ll"
1756 KEYWORD(130, 130, UVEC4); 1764 KEYWORD(130, 130, UVEC4);
1757 YY_BREAK 1765 YY_BREAK
1758 case 46: 1766 case 46:
1759 YY_RULE_SETUP 1767 YY_RULE_SETUP
1760 #line 248 "src/src/glsl/glsl_lexer.ll" 1768 #line 250 "src/src/glsl/glsl_lexer.ll"
1761 return VEC2; 1769 return VEC2;
1762 YY_BREAK 1770 YY_BREAK
1763 case 47: 1771 case 47:
1764 YY_RULE_SETUP 1772 YY_RULE_SETUP
1765 #line 249 "src/src/glsl/glsl_lexer.ll" 1773 #line 251 "src/src/glsl/glsl_lexer.ll"
1766 return VEC3; 1774 return VEC3;
1767 YY_BREAK 1775 YY_BREAK
1768 case 48: 1776 case 48:
1769 YY_RULE_SETUP 1777 YY_RULE_SETUP
1770 #line 250 "src/src/glsl/glsl_lexer.ll" 1778 #line 252 "src/src/glsl/glsl_lexer.ll"
1771 return VEC4; 1779 return VEC4;
1772 YY_BREAK 1780 YY_BREAK
1773 case 49: 1781 case 49:
1774 YY_RULE_SETUP 1782 YY_RULE_SETUP
1775 #line 251 "src/src/glsl/glsl_lexer.ll" 1783 #line 253 "src/src/glsl/glsl_lexer.ll"
1776 return MAT2X2; 1784 return MAT2X2;
1777 YY_BREAK 1785 YY_BREAK
1778 case 50: 1786 case 50:
1779 YY_RULE_SETUP 1787 YY_RULE_SETUP
1780 #line 252 "src/src/glsl/glsl_lexer.ll" 1788 #line 254 "src/src/glsl/glsl_lexer.ll"
1781 return MAT3X3; 1789 return MAT3X3;
1782 YY_BREAK 1790 YY_BREAK
1783 case 51: 1791 case 51:
1784 YY_RULE_SETUP 1792 YY_RULE_SETUP
1785 #line 253 "src/src/glsl/glsl_lexer.ll" 1793 #line 255 "src/src/glsl/glsl_lexer.ll"
1786 return MAT4X4; 1794 return MAT4X4;
1787 YY_BREAK 1795 YY_BREAK
1788 case 52: 1796 case 52:
1789 YY_RULE_SETUP 1797 YY_RULE_SETUP
1790 #line 254 "src/src/glsl/glsl_lexer.ll" 1798 #line 256 "src/src/glsl/glsl_lexer.ll"
1791 KEYWORD(120, 120, MAT2X2); 1799 KEYWORD(120, 120, MAT2X2);
1792 YY_BREAK 1800 YY_BREAK
1793 case 53: 1801 case 53:
1794 YY_RULE_SETUP 1802 YY_RULE_SETUP
1795 #line 255 "src/src/glsl/glsl_lexer.ll" 1803 #line 257 "src/src/glsl/glsl_lexer.ll"
1796 KEYWORD(120, 120, MAT2X3); 1804 KEYWORD(120, 120, MAT2X3);
1797 YY_BREAK 1805 YY_BREAK
1798 case 54: 1806 case 54:
1799 YY_RULE_SETUP 1807 YY_RULE_SETUP
1800 #line 256 "src/src/glsl/glsl_lexer.ll" 1808 #line 258 "src/src/glsl/glsl_lexer.ll"
1801 KEYWORD(120, 120, MAT2X4); 1809 KEYWORD(120, 120, MAT2X4);
1802 YY_BREAK 1810 YY_BREAK
1803 case 55: 1811 case 55:
1804 YY_RULE_SETUP 1812 YY_RULE_SETUP
1805 #line 257 "src/src/glsl/glsl_lexer.ll" 1813 #line 259 "src/src/glsl/glsl_lexer.ll"
1806 KEYWORD(120, 120, MAT3X2); 1814 KEYWORD(120, 120, MAT3X2);
1807 YY_BREAK 1815 YY_BREAK
1808 case 56: 1816 case 56:
1809 YY_RULE_SETUP 1817 YY_RULE_SETUP
1810 #line 258 "src/src/glsl/glsl_lexer.ll" 1818 #line 260 "src/src/glsl/glsl_lexer.ll"
1811 KEYWORD(120, 120, MAT3X3); 1819 KEYWORD(120, 120, MAT3X3);
1812 YY_BREAK 1820 YY_BREAK
1813 case 57: 1821 case 57:
1814 YY_RULE_SETUP 1822 YY_RULE_SETUP
1815 #line 259 "src/src/glsl/glsl_lexer.ll" 1823 #line 261 "src/src/glsl/glsl_lexer.ll"
1816 KEYWORD(120, 120, MAT3X4); 1824 KEYWORD(120, 120, MAT3X4);
1817 YY_BREAK 1825 YY_BREAK
1818 case 58: 1826 case 58:
1819 YY_RULE_SETUP 1827 YY_RULE_SETUP
1820 #line 260 "src/src/glsl/glsl_lexer.ll" 1828 #line 262 "src/src/glsl/glsl_lexer.ll"
1821 KEYWORD(120, 120, MAT4X2); 1829 KEYWORD(120, 120, MAT4X2);
1822 YY_BREAK 1830 YY_BREAK
1823 case 59: 1831 case 59:
1824 YY_RULE_SETUP 1832 YY_RULE_SETUP
1825 #line 261 "src/src/glsl/glsl_lexer.ll" 1833 #line 263 "src/src/glsl/glsl_lexer.ll"
1826 KEYWORD(120, 120, MAT4X3); 1834 KEYWORD(120, 120, MAT4X3);
1827 YY_BREAK 1835 YY_BREAK
1828 case 60: 1836 case 60:
1829 YY_RULE_SETUP 1837 YY_RULE_SETUP
1830 #line 262 "src/src/glsl/glsl_lexer.ll" 1838 #line 264 "src/src/glsl/glsl_lexer.ll"
1831 KEYWORD(120, 120, MAT4X4); 1839 KEYWORD(120, 120, MAT4X4);
1832 YY_BREAK 1840 YY_BREAK
1833 case 61: 1841 case 61:
1834 YY_RULE_SETUP 1842 YY_RULE_SETUP
1835 #line 264 "src/src/glsl/glsl_lexer.ll" 1843 #line 266 "src/src/glsl/glsl_lexer.ll"
1836 return IN_TOK; 1844 return IN_TOK;
1837 YY_BREAK 1845 YY_BREAK
1838 case 62: 1846 case 62:
1839 YY_RULE_SETUP 1847 YY_RULE_SETUP
1840 #line 265 "src/src/glsl/glsl_lexer.ll" 1848 #line 267 "src/src/glsl/glsl_lexer.ll"
1841 return OUT_TOK; 1849 return OUT_TOK;
1842 YY_BREAK 1850 YY_BREAK
1843 case 63: 1851 case 63:
1844 YY_RULE_SETUP 1852 YY_RULE_SETUP
1845 #line 266 "src/src/glsl/glsl_lexer.ll" 1853 #line 268 "src/src/glsl/glsl_lexer.ll"
1846 return INOUT_TOK; 1854 return INOUT_TOK;
1847 YY_BREAK 1855 YY_BREAK
1848 case 64: 1856 case 64:
1849 YY_RULE_SETUP 1857 YY_RULE_SETUP
1850 #line 267 "src/src/glsl/glsl_lexer.ll" 1858 #line 269 "src/src/glsl/glsl_lexer.ll"
1851 return UNIFORM; 1859 return UNIFORM;
1852 YY_BREAK 1860 YY_BREAK
1853 case 65: 1861 case 65:
1854 YY_RULE_SETUP 1862 YY_RULE_SETUP
1855 #line 268 "src/src/glsl/glsl_lexer.ll" 1863 #line 270 "src/src/glsl/glsl_lexer.ll"
1856 return VARYING; 1864 return VARYING;
1857 YY_BREAK 1865 YY_BREAK
1858 case 66: 1866 case 66:
1859 YY_RULE_SETUP 1867 YY_RULE_SETUP
1860 #line 269 "src/src/glsl/glsl_lexer.ll" 1868 #line 271 "src/src/glsl/glsl_lexer.ll"
1861 KEYWORD(120, 120, CENTROID); 1869 KEYWORD(120, 120, CENTROID);
1862 YY_BREAK 1870 YY_BREAK
1863 case 67: 1871 case 67:
1864 YY_RULE_SETUP 1872 YY_RULE_SETUP
1865 #line 270 "src/src/glsl/glsl_lexer.ll" 1873 #line 272 "src/src/glsl/glsl_lexer.ll"
1866 KEYWORD(120 || ES, 120 || ES, INVARIANT); 1874 KEYWORD(120 || ES, 120 || ES, INVARIANT);
1867 YY_BREAK 1875 YY_BREAK
1868 case 68: 1876 case 68:
1869 YY_RULE_SETUP 1877 YY_RULE_SETUP
1870 #line 271 "src/src/glsl/glsl_lexer.ll" 1878 #line 273 "src/src/glsl/glsl_lexer.ll"
1871 KEYWORD(130 || ES, 130, FLAT); 1879 KEYWORD(130 || ES, 130, FLAT);
1872 YY_BREAK 1880 YY_BREAK
1873 case 69: 1881 case 69:
1874 YY_RULE_SETUP 1882 YY_RULE_SETUP
1875 #line 272 "src/src/glsl/glsl_lexer.ll" 1883 #line 274 "src/src/glsl/glsl_lexer.ll"
1876 KEYWORD(130, 130, SMOOTH); 1884 KEYWORD(130, 130, SMOOTH);
1877 YY_BREAK 1885 YY_BREAK
1878 case 70: 1886 case 70:
1879 YY_RULE_SETUP 1887 YY_RULE_SETUP
1880 #line 273 "src/src/glsl/glsl_lexer.ll" 1888 #line 275 "src/src/glsl/glsl_lexer.ll"
1881 KEYWORD(130, 130, NOPERSPECTIVE); 1889 KEYWORD(130, 130, NOPERSPECTIVE);
1882 YY_BREAK 1890 YY_BREAK
1883 case 71: 1891 case 71:
1884 YY_RULE_SETUP 1892 YY_RULE_SETUP
1885 #line 275 "src/src/glsl/glsl_lexer.ll" 1893 #line 277 "src/src/glsl/glsl_lexer.ll"
1886 return SAMPLER1D; 1894 return SAMPLER1D;
1887 YY_BREAK 1895 YY_BREAK
1888 case 72: 1896 case 72:
1889 YY_RULE_SETUP 1897 YY_RULE_SETUP
1890 #line 276 "src/src/glsl/glsl_lexer.ll" 1898 #line 278 "src/src/glsl/glsl_lexer.ll"
1891 return SAMPLER2D; 1899 return SAMPLER2D;
1892 YY_BREAK 1900 YY_BREAK
1893 case 73: 1901 case 73:
1894 YY_RULE_SETUP 1902 YY_RULE_SETUP
1895 #line 277 "src/src/glsl/glsl_lexer.ll" 1903 #line 279 "src/src/glsl/glsl_lexer.ll"
1896 return SAMPLER3D; 1904 return SAMPLER3D;
1897 YY_BREAK 1905 YY_BREAK
1898 case 74: 1906 case 74:
1899 YY_RULE_SETUP 1907 YY_RULE_SETUP
1900 #line 278 "src/src/glsl/glsl_lexer.ll" 1908 #line 280 "src/src/glsl/glsl_lexer.ll"
1901 return SAMPLERCUBE; 1909 return SAMPLERCUBE;
1902 YY_BREAK 1910 YY_BREAK
1903 case 75: 1911 case 75:
1904 YY_RULE_SETUP 1912 YY_RULE_SETUP
1905 #line 279 "src/src/glsl/glsl_lexer.ll" 1913 #line 281 "src/src/glsl/glsl_lexer.ll"
1906 KEYWORD(130, 130, SAMPLER1DARRAY); 1914 KEYWORD(130, 130, SAMPLER1DARRAY);
1907 YY_BREAK 1915 YY_BREAK
1908 case 76: 1916 case 76:
1909 YY_RULE_SETUP 1917 YY_RULE_SETUP
1910 #line 280 "src/src/glsl/glsl_lexer.ll" 1918 #line 282 "src/src/glsl/glsl_lexer.ll"
1911 KEYWORD(130, 130, SAMPLER2DARRAY); 1919 KEYWORD(130, 130, SAMPLER2DARRAY);
1912 YY_BREAK 1920 YY_BREAK
1913 case 77: 1921 case 77:
1914 YY_RULE_SETUP 1922 YY_RULE_SETUP
1915 #line 281 "src/src/glsl/glsl_lexer.ll" 1923 #line 283 "src/src/glsl/glsl_lexer.ll"
1916 return SAMPLER1DSHADOW; 1924 return SAMPLER1DSHADOW;
1917 YY_BREAK 1925 YY_BREAK
1918 case 78: 1926 case 78:
1919 YY_RULE_SETUP 1927 YY_RULE_SETUP
1920 #line 282 "src/src/glsl/glsl_lexer.ll" 1928 #line 284 "src/src/glsl/glsl_lexer.ll"
1921 return SAMPLER2DSHADOW; 1929 return SAMPLER2DSHADOW;
1922 YY_BREAK 1930 YY_BREAK
1923 case 79: 1931 case 79:
1924 YY_RULE_SETUP 1932 YY_RULE_SETUP
1925 #line 283 "src/src/glsl/glsl_lexer.ll" 1933 #line 285 "src/src/glsl/glsl_lexer.ll"
1926 KEYWORD(130, 130, SAMPLERCUBESHADOW); 1934 KEYWORD(130, 130, SAMPLERCUBESHADOW);
1927 YY_BREAK 1935 YY_BREAK
1928 case 80: 1936 case 80:
1929 YY_RULE_SETUP 1937 YY_RULE_SETUP
1930 #line 284 "src/src/glsl/glsl_lexer.ll" 1938 #line 286 "src/src/glsl/glsl_lexer.ll"
1931 KEYWORD(130, 130, SAMPLER1DARRAYSHADOW); 1939 KEYWORD(130, 130, SAMPLER1DARRAYSHADOW);
1932 YY_BREAK 1940 YY_BREAK
1933 case 81: 1941 case 81:
1934 YY_RULE_SETUP 1942 YY_RULE_SETUP
1935 #line 285 "src/src/glsl/glsl_lexer.ll" 1943 #line 287 "src/src/glsl/glsl_lexer.ll"
1936 KEYWORD(130, 130, SAMPLER2DARRAYSHADOW); 1944 KEYWORD(130, 130, SAMPLER2DARRAYSHADOW);
1937 YY_BREAK 1945 YY_BREAK
1938 case 82: 1946 case 82:
1939 YY_RULE_SETUP 1947 YY_RULE_SETUP
1940 #line 286 "src/src/glsl/glsl_lexer.ll" 1948 #line 288 "src/src/glsl/glsl_lexer.ll"
1941 KEYWORD(130, 130, ISAMPLER1D); 1949 KEYWORD(130, 130, ISAMPLER1D);
1942 YY_BREAK 1950 YY_BREAK
1943 case 83: 1951 case 83:
1944 YY_RULE_SETUP 1952 YY_RULE_SETUP
1945 #line 287 "src/src/glsl/glsl_lexer.ll" 1953 #line 289 "src/src/glsl/glsl_lexer.ll"
1946 KEYWORD(130, 130, ISAMPLER2D); 1954 KEYWORD(130, 130, ISAMPLER2D);
1947 YY_BREAK 1955 YY_BREAK
1948 case 84: 1956 case 84:
1949 YY_RULE_SETUP 1957 YY_RULE_SETUP
1950 #line 288 "src/src/glsl/glsl_lexer.ll" 1958 #line 290 "src/src/glsl/glsl_lexer.ll"
1951 KEYWORD(130, 130, ISAMPLER3D); 1959 KEYWORD(130, 130, ISAMPLER3D);
1952 YY_BREAK 1960 YY_BREAK
1953 case 85: 1961 case 85:
1954 YY_RULE_SETUP 1962 YY_RULE_SETUP
1955 #line 289 "src/src/glsl/glsl_lexer.ll" 1963 #line 291 "src/src/glsl/glsl_lexer.ll"
1956 KEYWORD(130, 130, ISAMPLERCUBE); 1964 KEYWORD(130, 130, ISAMPLERCUBE);
1957 YY_BREAK 1965 YY_BREAK
1958 case 86: 1966 case 86:
1959 YY_RULE_SETUP 1967 YY_RULE_SETUP
1960 #line 290 "src/src/glsl/glsl_lexer.ll" 1968 #line 292 "src/src/glsl/glsl_lexer.ll"
1961 KEYWORD(130, 130, ISAMPLER1DARRAY); 1969 KEYWORD(130, 130, ISAMPLER1DARRAY);
1962 YY_BREAK 1970 YY_BREAK
1963 case 87: 1971 case 87:
1964 YY_RULE_SETUP 1972 YY_RULE_SETUP
1965 #line 291 "src/src/glsl/glsl_lexer.ll" 1973 #line 293 "src/src/glsl/glsl_lexer.ll"
1966 KEYWORD(130, 130, ISAMPLER2DARRAY); 1974 KEYWORD(130, 130, ISAMPLER2DARRAY);
1967 YY_BREAK 1975 YY_BREAK
1968 case 88: 1976 case 88:
1969 YY_RULE_SETUP 1977 YY_RULE_SETUP
1970 #line 292 "src/src/glsl/glsl_lexer.ll" 1978 #line 294 "src/src/glsl/glsl_lexer.ll"
1971 KEYWORD(130, 130, USAMPLER1D); 1979 KEYWORD(130, 130, USAMPLER1D);
1972 YY_BREAK 1980 YY_BREAK
1973 case 89: 1981 case 89:
1974 YY_RULE_SETUP 1982 YY_RULE_SETUP
1975 #line 293 "src/src/glsl/glsl_lexer.ll" 1983 #line 295 "src/src/glsl/glsl_lexer.ll"
1976 KEYWORD(130, 130, USAMPLER2D); 1984 KEYWORD(130, 130, USAMPLER2D);
1977 YY_BREAK 1985 YY_BREAK
1978 case 90: 1986 case 90:
1979 YY_RULE_SETUP 1987 YY_RULE_SETUP
1980 #line 294 "src/src/glsl/glsl_lexer.ll" 1988 #line 296 "src/src/glsl/glsl_lexer.ll"
1981 KEYWORD(130, 130, USAMPLER3D); 1989 KEYWORD(130, 130, USAMPLER3D);
1982 YY_BREAK 1990 YY_BREAK
1983 case 91: 1991 case 91:
1984 YY_RULE_SETUP 1992 YY_RULE_SETUP
1985 #line 295 "src/src/glsl/glsl_lexer.ll" 1993 #line 297 "src/src/glsl/glsl_lexer.ll"
1986 KEYWORD(130, 130, USAMPLERCUBE); 1994 KEYWORD(130, 130, USAMPLERCUBE);
1987 YY_BREAK 1995 YY_BREAK
1988 case 92: 1996 case 92:
1989 YY_RULE_SETUP 1997 YY_RULE_SETUP
1990 #line 296 "src/src/glsl/glsl_lexer.ll" 1998 #line 298 "src/src/glsl/glsl_lexer.ll"
1991 KEYWORD(130, 130, USAMPLER1DARRAY); 1999 KEYWORD(130, 130, USAMPLER1DARRAY);
1992 YY_BREAK 2000 YY_BREAK
1993 case 93: 2001 case 93:
1994 YY_RULE_SETUP 2002 YY_RULE_SETUP
1995 #line 297 "src/src/glsl/glsl_lexer.ll" 2003 #line 299 "src/src/glsl/glsl_lexer.ll"
1996 KEYWORD(130, 130, USAMPLER2DARRAY); 2004 KEYWORD(130, 130, USAMPLER2DARRAY);
1997 YY_BREAK 2005 YY_BREAK
1998 case 94: 2006 case 94:
1999 YY_RULE_SETUP 2007 YY_RULE_SETUP
2000 #line 299 "src/src/glsl/glsl_lexer.ll" 2008 #line 301 "src/src/glsl/glsl_lexer.ll"
2001 { 2009 {
2002 if (yyextra->OES_EGL_image_external_enable) 2010 if (yyextra->OES_EGL_image_external_enable)
2003 return SAMPLEREXTERNALOES; 2011 return SAMPLEREXTERNALOES;
2004 else 2012 else
2005 return IDENTIFIER; 2013 return IDENTIFIER;
2006 } 2014 }
2007 YY_BREAK 2015 YY_BREAK
2008 case 95: 2016 case 95:
2009 YY_RULE_SETUP 2017 YY_RULE_SETUP
2010 #line 307 "src/src/glsl/glsl_lexer.ll" 2018 #line 309 "src/src/glsl/glsl_lexer.ll"
2011 return STRUCT; 2019 return STRUCT;
2012 YY_BREAK 2020 YY_BREAK
2013 case 96: 2021 case 96:
2014 YY_RULE_SETUP 2022 YY_RULE_SETUP
2015 #line 308 "src/src/glsl/glsl_lexer.ll" 2023 #line 310 "src/src/glsl/glsl_lexer.ll"
2016 return VOID_TOK; 2024 return VOID_TOK;
2017 YY_BREAK 2025 YY_BREAK
2018 case 97: 2026 case 97:
2019 YY_RULE_SETUP 2027 YY_RULE_SETUP
2020 #line 310 "src/src/glsl/glsl_lexer.ll" 2028 #line 312 "src/src/glsl/glsl_lexer.ll"
2021 { 2029 {
2022 if ((yyextra->language_version >= 140) 2030 if ((yyextra->language_version >= 140)
2023 || yyextra->AMD_conservative_depth_enable 2031 || yyextra->AMD_conservative_depth_enable
2024 || yyextra->ARB_conservative_depth_enable 2032 || yyextra->ARB_conservative_depth_enable
2025 || yyextra->ARB_explicit_attrib_location_enable 2033 || yyextra->ARB_explicit_attrib_location_enable
2026 || yyextra->ARB_uniform_buffer_object_enable 2034 || yyextra->ARB_uniform_buffer_object_enable
2027 || yyextra->ARB_fragment_coord_conventions_enable) { 2035 || yyextra->ARB_fragment_coord_conventions_enable) {
2028 return LAYOUT_TOK; 2036 return LAYOUT_TOK;
2029 } else { 2037 } else {
2030 » » yylval->identifier = strdup(yytext); 2038 » » void *mem_ctx = yyextra;
2039 » » yylval->identifier = ralloc_strdup(mem_ctx, yytext);
2031 return IDENTIFIER; 2040 return IDENTIFIER;
2032 } 2041 }
2033 } 2042 }
2034 YY_BREAK 2043 YY_BREAK
2035 case 98: 2044 case 98:
2036 YY_RULE_SETUP 2045 YY_RULE_SETUP
2037 #line 324 "src/src/glsl/glsl_lexer.ll" 2046 #line 327 "src/src/glsl/glsl_lexer.ll"
2038 return INC_OP; 2047 return INC_OP;
2039 YY_BREAK 2048 YY_BREAK
2040 case 99: 2049 case 99:
2041 YY_RULE_SETUP 2050 YY_RULE_SETUP
2042 #line 325 "src/src/glsl/glsl_lexer.ll" 2051 #line 328 "src/src/glsl/glsl_lexer.ll"
2043 return DEC_OP; 2052 return DEC_OP;
2044 YY_BREAK 2053 YY_BREAK
2045 case 100: 2054 case 100:
2046 YY_RULE_SETUP 2055 YY_RULE_SETUP
2047 #line 326 "src/src/glsl/glsl_lexer.ll" 2056 #line 329 "src/src/glsl/glsl_lexer.ll"
2048 return LE_OP; 2057 return LE_OP;
2049 YY_BREAK 2058 YY_BREAK
2050 case 101: 2059 case 101:
2051 YY_RULE_SETUP 2060 YY_RULE_SETUP
2052 #line 327 "src/src/glsl/glsl_lexer.ll" 2061 #line 330 "src/src/glsl/glsl_lexer.ll"
2053 return GE_OP; 2062 return GE_OP;
2054 YY_BREAK 2063 YY_BREAK
2055 case 102: 2064 case 102:
2056 YY_RULE_SETUP 2065 YY_RULE_SETUP
2057 #line 328 "src/src/glsl/glsl_lexer.ll" 2066 #line 331 "src/src/glsl/glsl_lexer.ll"
2058 return EQ_OP; 2067 return EQ_OP;
2059 YY_BREAK 2068 YY_BREAK
2060 case 103: 2069 case 103:
2061 YY_RULE_SETUP 2070 YY_RULE_SETUP
2062 #line 329 "src/src/glsl/glsl_lexer.ll" 2071 #line 332 "src/src/glsl/glsl_lexer.ll"
2063 return NE_OP; 2072 return NE_OP;
2064 YY_BREAK 2073 YY_BREAK
2065 case 104: 2074 case 104:
2066 YY_RULE_SETUP 2075 YY_RULE_SETUP
2067 #line 330 "src/src/glsl/glsl_lexer.ll" 2076 #line 333 "src/src/glsl/glsl_lexer.ll"
2068 return AND_OP; 2077 return AND_OP;
2069 YY_BREAK 2078 YY_BREAK
2070 case 105: 2079 case 105:
2071 YY_RULE_SETUP 2080 YY_RULE_SETUP
2072 #line 331 "src/src/glsl/glsl_lexer.ll" 2081 #line 334 "src/src/glsl/glsl_lexer.ll"
2073 return OR_OP; 2082 return OR_OP;
2074 YY_BREAK 2083 YY_BREAK
2075 case 106: 2084 case 106:
2076 YY_RULE_SETUP 2085 YY_RULE_SETUP
2077 #line 332 "src/src/glsl/glsl_lexer.ll" 2086 #line 335 "src/src/glsl/glsl_lexer.ll"
2078 return XOR_OP; 2087 return XOR_OP;
2079 YY_BREAK 2088 YY_BREAK
2080 case 107: 2089 case 107:
2081 YY_RULE_SETUP 2090 YY_RULE_SETUP
2082 #line 333 "src/src/glsl/glsl_lexer.ll" 2091 #line 336 "src/src/glsl/glsl_lexer.ll"
2083 return LEFT_OP; 2092 return LEFT_OP;
2084 YY_BREAK 2093 YY_BREAK
2085 case 108: 2094 case 108:
2086 YY_RULE_SETUP 2095 YY_RULE_SETUP
2087 #line 334 "src/src/glsl/glsl_lexer.ll" 2096 #line 337 "src/src/glsl/glsl_lexer.ll"
2088 return RIGHT_OP; 2097 return RIGHT_OP;
2089 YY_BREAK 2098 YY_BREAK
2090 case 109: 2099 case 109:
2091 YY_RULE_SETUP 2100 YY_RULE_SETUP
2092 #line 336 "src/src/glsl/glsl_lexer.ll" 2101 #line 339 "src/src/glsl/glsl_lexer.ll"
2093 return MUL_ASSIGN; 2102 return MUL_ASSIGN;
2094 YY_BREAK 2103 YY_BREAK
2095 case 110: 2104 case 110:
2096 YY_RULE_SETUP 2105 YY_RULE_SETUP
2097 #line 337 "src/src/glsl/glsl_lexer.ll" 2106 #line 340 "src/src/glsl/glsl_lexer.ll"
2098 return DIV_ASSIGN; 2107 return DIV_ASSIGN;
2099 YY_BREAK 2108 YY_BREAK
2100 case 111: 2109 case 111:
2101 YY_RULE_SETUP 2110 YY_RULE_SETUP
2102 #line 338 "src/src/glsl/glsl_lexer.ll" 2111 #line 341 "src/src/glsl/glsl_lexer.ll"
2103 return ADD_ASSIGN; 2112 return ADD_ASSIGN;
2104 YY_BREAK 2113 YY_BREAK
2105 case 112: 2114 case 112:
2106 YY_RULE_SETUP 2115 YY_RULE_SETUP
2107 #line 339 "src/src/glsl/glsl_lexer.ll" 2116 #line 342 "src/src/glsl/glsl_lexer.ll"
2108 return MOD_ASSIGN; 2117 return MOD_ASSIGN;
2109 YY_BREAK 2118 YY_BREAK
2110 case 113: 2119 case 113:
2111 YY_RULE_SETUP 2120 YY_RULE_SETUP
2112 #line 340 "src/src/glsl/glsl_lexer.ll" 2121 #line 343 "src/src/glsl/glsl_lexer.ll"
2113 return LEFT_ASSIGN; 2122 return LEFT_ASSIGN;
2114 YY_BREAK 2123 YY_BREAK
2115 case 114: 2124 case 114:
2116 YY_RULE_SETUP 2125 YY_RULE_SETUP
2117 #line 341 "src/src/glsl/glsl_lexer.ll" 2126 #line 344 "src/src/glsl/glsl_lexer.ll"
2118 return RIGHT_ASSIGN; 2127 return RIGHT_ASSIGN;
2119 YY_BREAK 2128 YY_BREAK
2120 case 115: 2129 case 115:
2121 YY_RULE_SETUP 2130 YY_RULE_SETUP
2122 #line 342 "src/src/glsl/glsl_lexer.ll" 2131 #line 345 "src/src/glsl/glsl_lexer.ll"
2123 return AND_ASSIGN; 2132 return AND_ASSIGN;
2124 YY_BREAK 2133 YY_BREAK
2125 case 116: 2134 case 116:
2126 YY_RULE_SETUP 2135 YY_RULE_SETUP
2127 #line 343 "src/src/glsl/glsl_lexer.ll" 2136 #line 346 "src/src/glsl/glsl_lexer.ll"
2128 return XOR_ASSIGN; 2137 return XOR_ASSIGN;
2129 YY_BREAK 2138 YY_BREAK
2130 case 117: 2139 case 117:
2131 YY_RULE_SETUP 2140 YY_RULE_SETUP
2132 #line 344 "src/src/glsl/glsl_lexer.ll" 2141 #line 347 "src/src/glsl/glsl_lexer.ll"
2133 return OR_ASSIGN; 2142 return OR_ASSIGN;
2134 YY_BREAK 2143 YY_BREAK
2135 case 118: 2144 case 118:
2136 YY_RULE_SETUP 2145 YY_RULE_SETUP
2137 #line 345 "src/src/glsl/glsl_lexer.ll" 2146 #line 348 "src/src/glsl/glsl_lexer.ll"
2138 return SUB_ASSIGN; 2147 return SUB_ASSIGN;
2139 YY_BREAK 2148 YY_BREAK
2140 case 119: 2149 case 119:
2141 YY_RULE_SETUP 2150 YY_RULE_SETUP
2142 #line 347 "src/src/glsl/glsl_lexer.ll" 2151 #line 350 "src/src/glsl/glsl_lexer.ll"
2143 { 2152 {
2144 return LITERAL_INTEGER(10); 2153 return LITERAL_INTEGER(10);
2145 } 2154 }
2146 YY_BREAK 2155 YY_BREAK
2147 case 120: 2156 case 120:
2148 YY_RULE_SETUP 2157 YY_RULE_SETUP
2149 #line 350 "src/src/glsl/glsl_lexer.ll" 2158 #line 353 "src/src/glsl/glsl_lexer.ll"
2150 { 2159 {
2151 return LITERAL_INTEGER(16); 2160 return LITERAL_INTEGER(16);
2152 } 2161 }
2153 YY_BREAK 2162 YY_BREAK
2154 case 121: 2163 case 121:
2155 YY_RULE_SETUP 2164 YY_RULE_SETUP
2156 #line 353 "src/src/glsl/glsl_lexer.ll" 2165 #line 356 "src/src/glsl/glsl_lexer.ll"
2157 { 2166 {
2158 return LITERAL_INTEGER(8); 2167 return LITERAL_INTEGER(8);
2159 } 2168 }
2160 YY_BREAK 2169 YY_BREAK
2161 case 122: 2170 case 122:
2162 YY_RULE_SETUP 2171 YY_RULE_SETUP
2163 #line 357 "src/src/glsl/glsl_lexer.ll" 2172 #line 360 "src/src/glsl/glsl_lexer.ll"
2164 { 2173 {
2165 yylval->real = glsl_strtod(yytext, NULL); 2174 yylval->real = glsl_strtod(yytext, NULL);
2166 return FLOATCONSTANT; 2175 return FLOATCONSTANT;
2167 } 2176 }
2168 YY_BREAK 2177 YY_BREAK
2169 case 123: 2178 case 123:
2170 YY_RULE_SETUP 2179 YY_RULE_SETUP
2171 #line 361 "src/src/glsl/glsl_lexer.ll" 2180 #line 364 "src/src/glsl/glsl_lexer.ll"
2172 { 2181 {
2173 yylval->real = glsl_strtod(yytext, NULL); 2182 yylval->real = glsl_strtod(yytext, NULL);
2174 return FLOATCONSTANT; 2183 return FLOATCONSTANT;
2175 } 2184 }
2176 YY_BREAK 2185 YY_BREAK
2177 case 124: 2186 case 124:
2178 YY_RULE_SETUP 2187 YY_RULE_SETUP
2179 #line 365 "src/src/glsl/glsl_lexer.ll" 2188 #line 368 "src/src/glsl/glsl_lexer.ll"
2180 { 2189 {
2181 yylval->real = glsl_strtod(yytext, NULL); 2190 yylval->real = glsl_strtod(yytext, NULL);
2182 return FLOATCONSTANT; 2191 return FLOATCONSTANT;
2183 } 2192 }
2184 YY_BREAK 2193 YY_BREAK
2185 case 125: 2194 case 125:
2186 YY_RULE_SETUP 2195 YY_RULE_SETUP
2187 #line 369 "src/src/glsl/glsl_lexer.ll" 2196 #line 372 "src/src/glsl/glsl_lexer.ll"
2188 { 2197 {
2189 yylval->real = glsl_strtod(yytext, NULL); 2198 yylval->real = glsl_strtod(yytext, NULL);
2190 return FLOATCONSTANT; 2199 return FLOATCONSTANT;
2191 } 2200 }
2192 YY_BREAK 2201 YY_BREAK
2193 case 126: 2202 case 126:
2194 YY_RULE_SETUP 2203 YY_RULE_SETUP
2195 #line 373 "src/src/glsl/glsl_lexer.ll" 2204 #line 376 "src/src/glsl/glsl_lexer.ll"
2196 { 2205 {
2197 yylval->real = glsl_strtod(yytext, NULL); 2206 yylval->real = glsl_strtod(yytext, NULL);
2198 return FLOATCONSTANT; 2207 return FLOATCONSTANT;
2199 } 2208 }
2200 YY_BREAK 2209 YY_BREAK
2201 case 127: 2210 case 127:
2202 YY_RULE_SETUP 2211 YY_RULE_SETUP
2203 #line 378 "src/src/glsl/glsl_lexer.ll" 2212 #line 381 "src/src/glsl/glsl_lexer.ll"
2204 { 2213 {
2205 yylval->n = 1; 2214 yylval->n = 1;
2206 return BOOLCONSTANT; 2215 return BOOLCONSTANT;
2207 } 2216 }
2208 YY_BREAK 2217 YY_BREAK
2209 case 128: 2218 case 128:
2210 YY_RULE_SETUP 2219 YY_RULE_SETUP
2211 #line 382 "src/src/glsl/glsl_lexer.ll" 2220 #line 385 "src/src/glsl/glsl_lexer.ll"
2212 { 2221 {
2213 yylval->n = 0; 2222 yylval->n = 0;
2214 return BOOLCONSTANT; 2223 return BOOLCONSTANT;
2215 } 2224 }
2216 YY_BREAK 2225 YY_BREAK
2217 /* Reserved words in GLSL 1.10. */ 2226 /* Reserved words in GLSL 1.10. */
2218 case 129: 2227 case 129:
2219 YY_RULE_SETUP 2228 YY_RULE_SETUP
2220 #line 389 "src/src/glsl/glsl_lexer.ll" 2229 #line 392 "src/src/glsl/glsl_lexer.ll"
2221 KEYWORD(110 || ES, 999, ASM); 2230 KEYWORD(110 || ES, 999, ASM);
2222 YY_BREAK 2231 YY_BREAK
2223 case 130: 2232 case 130:
2224 YY_RULE_SETUP 2233 YY_RULE_SETUP
2225 #line 390 "src/src/glsl/glsl_lexer.ll" 2234 #line 393 "src/src/glsl/glsl_lexer.ll"
2226 KEYWORD(110 || ES, 999, CLASS); 2235 KEYWORD(110 || ES, 999, CLASS);
2227 YY_BREAK 2236 YY_BREAK
2228 case 131: 2237 case 131:
2229 YY_RULE_SETUP 2238 YY_RULE_SETUP
2230 #line 391 "src/src/glsl/glsl_lexer.ll" 2239 #line 394 "src/src/glsl/glsl_lexer.ll"
2231 KEYWORD(110 || ES, 999, UNION); 2240 KEYWORD(110 || ES, 999, UNION);
2232 YY_BREAK 2241 YY_BREAK
2233 case 132: 2242 case 132:
2234 YY_RULE_SETUP 2243 YY_RULE_SETUP
2235 #line 392 "src/src/glsl/glsl_lexer.ll" 2244 #line 395 "src/src/glsl/glsl_lexer.ll"
2236 KEYWORD(110 || ES, 999, ENUM); 2245 KEYWORD(110 || ES, 999, ENUM);
2237 YY_BREAK 2246 YY_BREAK
2238 case 133: 2247 case 133:
2239 YY_RULE_SETUP 2248 YY_RULE_SETUP
2240 #line 393 "src/src/glsl/glsl_lexer.ll" 2249 #line 396 "src/src/glsl/glsl_lexer.ll"
2241 KEYWORD(110 || ES, 999, TYPEDEF); 2250 KEYWORD(110 || ES, 999, TYPEDEF);
2242 YY_BREAK 2251 YY_BREAK
2243 case 134: 2252 case 134:
2244 YY_RULE_SETUP 2253 YY_RULE_SETUP
2245 #line 394 "src/src/glsl/glsl_lexer.ll" 2254 #line 397 "src/src/glsl/glsl_lexer.ll"
2246 KEYWORD(110 || ES, 999, TEMPLATE); 2255 KEYWORD(110 || ES, 999, TEMPLATE);
2247 YY_BREAK 2256 YY_BREAK
2248 case 135: 2257 case 135:
2249 YY_RULE_SETUP 2258 YY_RULE_SETUP
2250 #line 395 "src/src/glsl/glsl_lexer.ll" 2259 #line 398 "src/src/glsl/glsl_lexer.ll"
2251 KEYWORD(110 || ES, 999, THIS); 2260 KEYWORD(110 || ES, 999, THIS);
2252 YY_BREAK 2261 YY_BREAK
2253 case 136: 2262 case 136:
2254 YY_RULE_SETUP 2263 YY_RULE_SETUP
2255 #line 396 "src/src/glsl/glsl_lexer.ll" 2264 #line 399 "src/src/glsl/glsl_lexer.ll"
2256 KEYWORD(110 || ES, 140 || yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK) ; 2265 KEYWORD(110 || ES, 140 || yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK) ;
2257 YY_BREAK 2266 YY_BREAK
2258 case 137: 2267 case 137:
2259 YY_RULE_SETUP 2268 YY_RULE_SETUP
2260 #line 397 "src/src/glsl/glsl_lexer.ll" 2269 #line 400 "src/src/glsl/glsl_lexer.ll"
2261 KEYWORD(110 || ES, 999, GOTO); 2270 KEYWORD(110 || ES, 999, GOTO);
2262 YY_BREAK 2271 YY_BREAK
2263 case 138: 2272 case 138:
2264 YY_RULE_SETUP 2273 YY_RULE_SETUP
2265 #line 398 "src/src/glsl/glsl_lexer.ll" 2274 #line 401 "src/src/glsl/glsl_lexer.ll"
2266 KEYWORD(110 || ES, 130, SWITCH); 2275 KEYWORD(110 || ES, 130, SWITCH);
2267 YY_BREAK 2276 YY_BREAK
2268 case 139: 2277 case 139:
2269 YY_RULE_SETUP 2278 YY_RULE_SETUP
2270 #line 399 "src/src/glsl/glsl_lexer.ll" 2279 #line 402 "src/src/glsl/glsl_lexer.ll"
2271 KEYWORD(110 || ES, 130, DEFAULT); 2280 KEYWORD(110 || ES, 130, DEFAULT);
2272 YY_BREAK 2281 YY_BREAK
2273 case 140: 2282 case 140:
2274 YY_RULE_SETUP 2283 YY_RULE_SETUP
2275 #line 400 "src/src/glsl/glsl_lexer.ll" 2284 #line 403 "src/src/glsl/glsl_lexer.ll"
2276 KEYWORD(110 || ES, 999, INLINE_TOK); 2285 KEYWORD(110 || ES, 999, INLINE_TOK);
2277 YY_BREAK 2286 YY_BREAK
2278 case 141: 2287 case 141:
2279 YY_RULE_SETUP 2288 YY_RULE_SETUP
2280 #line 401 "src/src/glsl/glsl_lexer.ll" 2289 #line 404 "src/src/glsl/glsl_lexer.ll"
2281 KEYWORD(110 || ES, 999, NOINLINE); 2290 KEYWORD(110 || ES, 999, NOINLINE);
2282 YY_BREAK 2291 YY_BREAK
2283 case 142: 2292 case 142:
2284 YY_RULE_SETUP 2293 YY_RULE_SETUP
2285 #line 402 "src/src/glsl/glsl_lexer.ll" 2294 #line 405 "src/src/glsl/glsl_lexer.ll"
2286 KEYWORD(110 || ES, 999, VOLATILE); 2295 KEYWORD(110 || ES, 999, VOLATILE);
2287 YY_BREAK 2296 YY_BREAK
2288 case 143: 2297 case 143:
2289 YY_RULE_SETUP 2298 YY_RULE_SETUP
2290 #line 403 "src/src/glsl/glsl_lexer.ll" 2299 #line 406 "src/src/glsl/glsl_lexer.ll"
2291 KEYWORD(110 || ES, 999, PUBLIC_TOK); 2300 KEYWORD(110 || ES, 999, PUBLIC_TOK);
2292 YY_BREAK 2301 YY_BREAK
2293 case 144: 2302 case 144:
2294 YY_RULE_SETUP 2303 YY_RULE_SETUP
2295 #line 404 "src/src/glsl/glsl_lexer.ll" 2304 #line 407 "src/src/glsl/glsl_lexer.ll"
2296 KEYWORD(110 || ES, 999, STATIC); 2305 KEYWORD(110 || ES, 999, STATIC);
2297 YY_BREAK 2306 YY_BREAK
2298 case 145: 2307 case 145:
2299 YY_RULE_SETUP 2308 YY_RULE_SETUP
2300 #line 405 "src/src/glsl/glsl_lexer.ll" 2309 #line 408 "src/src/glsl/glsl_lexer.ll"
2301 KEYWORD(110 || ES, 999, EXTERN); 2310 KEYWORD(110 || ES, 999, EXTERN);
2302 YY_BREAK 2311 YY_BREAK
2303 case 146: 2312 case 146:
2304 YY_RULE_SETUP 2313 YY_RULE_SETUP
2305 #line 406 "src/src/glsl/glsl_lexer.ll" 2314 #line 409 "src/src/glsl/glsl_lexer.ll"
2306 KEYWORD(110 || ES, 999, EXTERNAL); 2315 KEYWORD(110 || ES, 999, EXTERNAL);
2307 YY_BREAK 2316 YY_BREAK
2308 case 147: 2317 case 147:
2309 YY_RULE_SETUP 2318 YY_RULE_SETUP
2310 #line 407 "src/src/glsl/glsl_lexer.ll" 2319 #line 410 "src/src/glsl/glsl_lexer.ll"
2311 KEYWORD(110 || ES, 999, INTERFACE); 2320 KEYWORD(110 || ES, 999, INTERFACE);
2312 YY_BREAK 2321 YY_BREAK
2313 case 148: 2322 case 148:
2314 YY_RULE_SETUP 2323 YY_RULE_SETUP
2315 #line 408 "src/src/glsl/glsl_lexer.ll" 2324 #line 411 "src/src/glsl/glsl_lexer.ll"
2316 KEYWORD(110 || ES, 999, LONG_TOK); 2325 KEYWORD(110 || ES, 999, LONG_TOK);
2317 YY_BREAK 2326 YY_BREAK
2318 case 149: 2327 case 149:
2319 YY_RULE_SETUP 2328 YY_RULE_SETUP
2320 #line 409 "src/src/glsl/glsl_lexer.ll" 2329 #line 412 "src/src/glsl/glsl_lexer.ll"
2321 KEYWORD(110 || ES, 999, SHORT_TOK); 2330 KEYWORD(110 || ES, 999, SHORT_TOK);
2322 YY_BREAK 2331 YY_BREAK
2323 case 150: 2332 case 150:
2324 YY_RULE_SETUP 2333 YY_RULE_SETUP
2325 #line 410 "src/src/glsl/glsl_lexer.ll" 2334 #line 413 "src/src/glsl/glsl_lexer.ll"
2326 KEYWORD(110 || ES, 400, DOUBLE_TOK); 2335 KEYWORD(110 || ES, 400, DOUBLE_TOK);
2327 YY_BREAK 2336 YY_BREAK
2328 case 151: 2337 case 151:
2329 YY_RULE_SETUP 2338 YY_RULE_SETUP
2330 #line 411 "src/src/glsl/glsl_lexer.ll" 2339 #line 414 "src/src/glsl/glsl_lexer.ll"
2331 KEYWORD(110 || ES, 999, HALF); 2340 KEYWORD(110 || ES, 999, HALF);
2332 YY_BREAK 2341 YY_BREAK
2333 case 152: 2342 case 152:
2334 YY_RULE_SETUP 2343 YY_RULE_SETUP
2335 #line 412 "src/src/glsl/glsl_lexer.ll" 2344 #line 415 "src/src/glsl/glsl_lexer.ll"
2336 KEYWORD(110 || ES, 999, FIXED_TOK); 2345 KEYWORD(110 || ES, 999, FIXED_TOK);
2337 YY_BREAK 2346 YY_BREAK
2338 case 153: 2347 case 153:
2339 YY_RULE_SETUP 2348 YY_RULE_SETUP
2340 #line 413 "src/src/glsl/glsl_lexer.ll" 2349 #line 416 "src/src/glsl/glsl_lexer.ll"
2341 KEYWORD(110 || ES, 999, UNSIGNED); 2350 KEYWORD(110 || ES, 999, UNSIGNED);
2342 YY_BREAK 2351 YY_BREAK
2343 case 154: 2352 case 154:
2344 YY_RULE_SETUP 2353 YY_RULE_SETUP
2345 #line 414 "src/src/glsl/glsl_lexer.ll" 2354 #line 417 "src/src/glsl/glsl_lexer.ll"
2346 KEYWORD(110 || ES, 999, INPUT_TOK); 2355 KEYWORD(110 || ES, 999, INPUT_TOK);
2347 YY_BREAK 2356 YY_BREAK
2348 case 155: 2357 case 155:
2349 YY_RULE_SETUP 2358 YY_RULE_SETUP
2350 #line 415 "src/src/glsl/glsl_lexer.ll" 2359 #line 418 "src/src/glsl/glsl_lexer.ll"
2351 KEYWORD(110 || ES, 999, OUTPUT); 2360 KEYWORD(110 || ES, 999, OUTPUT);
2352 YY_BREAK 2361 YY_BREAK
2353 case 156: 2362 case 156:
2354 YY_RULE_SETUP 2363 YY_RULE_SETUP
2355 #line 416 "src/src/glsl/glsl_lexer.ll" 2364 #line 419 "src/src/glsl/glsl_lexer.ll"
2356 KEYWORD(110 || ES, 999, HVEC2); 2365 KEYWORD(110 || ES, 999, HVEC2);
2357 YY_BREAK 2366 YY_BREAK
2358 case 157: 2367 case 157:
2359 YY_RULE_SETUP 2368 YY_RULE_SETUP
2360 #line 417 "src/src/glsl/glsl_lexer.ll" 2369 #line 420 "src/src/glsl/glsl_lexer.ll"
2361 KEYWORD(110 || ES, 999, HVEC3); 2370 KEYWORD(110 || ES, 999, HVEC3);
2362 YY_BREAK 2371 YY_BREAK
2363 case 158: 2372 case 158:
2364 YY_RULE_SETUP 2373 YY_RULE_SETUP
2365 #line 418 "src/src/glsl/glsl_lexer.ll" 2374 #line 421 "src/src/glsl/glsl_lexer.ll"
2366 KEYWORD(110 || ES, 999, HVEC4); 2375 KEYWORD(110 || ES, 999, HVEC4);
2367 YY_BREAK 2376 YY_BREAK
2368 case 159: 2377 case 159:
2369 YY_RULE_SETUP 2378 YY_RULE_SETUP
2370 #line 419 "src/src/glsl/glsl_lexer.ll" 2379 #line 422 "src/src/glsl/glsl_lexer.ll"
2371 KEYWORD(110 || ES, 400, DVEC2); 2380 KEYWORD(110 || ES, 400, DVEC2);
2372 YY_BREAK 2381 YY_BREAK
2373 case 160: 2382 case 160:
2374 YY_RULE_SETUP 2383 YY_RULE_SETUP
2375 #line 420 "src/src/glsl/glsl_lexer.ll" 2384 #line 423 "src/src/glsl/glsl_lexer.ll"
2376 KEYWORD(110 || ES, 400, DVEC3); 2385 KEYWORD(110 || ES, 400, DVEC3);
2377 YY_BREAK 2386 YY_BREAK
2378 case 161: 2387 case 161:
2379 YY_RULE_SETUP 2388 YY_RULE_SETUP
2380 #line 421 "src/src/glsl/glsl_lexer.ll" 2389 #line 424 "src/src/glsl/glsl_lexer.ll"
2381 KEYWORD(110 || ES, 400, DVEC4); 2390 KEYWORD(110 || ES, 400, DVEC4);
2382 YY_BREAK 2391 YY_BREAK
2383 case 162: 2392 case 162:
2384 YY_RULE_SETUP 2393 YY_RULE_SETUP
2385 #line 422 "src/src/glsl/glsl_lexer.ll" 2394 #line 425 "src/src/glsl/glsl_lexer.ll"
2386 KEYWORD(110 || ES, 999, FVEC2); 2395 KEYWORD(110 || ES, 999, FVEC2);
2387 YY_BREAK 2396 YY_BREAK
2388 case 163: 2397 case 163:
2389 YY_RULE_SETUP 2398 YY_RULE_SETUP
2390 #line 423 "src/src/glsl/glsl_lexer.ll" 2399 #line 426 "src/src/glsl/glsl_lexer.ll"
2391 KEYWORD(110 || ES, 999, FVEC3); 2400 KEYWORD(110 || ES, 999, FVEC3);
2392 YY_BREAK 2401 YY_BREAK
2393 case 164: 2402 case 164:
2394 YY_RULE_SETUP 2403 YY_RULE_SETUP
2395 #line 424 "src/src/glsl/glsl_lexer.ll" 2404 #line 427 "src/src/glsl/glsl_lexer.ll"
2396 KEYWORD(110 || ES, 999, FVEC4); 2405 KEYWORD(110 || ES, 999, FVEC4);
2397 YY_BREAK 2406 YY_BREAK
2398 case 165: 2407 case 165:
2399 YY_RULE_SETUP 2408 YY_RULE_SETUP
2400 #line 425 "src/src/glsl/glsl_lexer.ll" 2409 #line 428 "src/src/glsl/glsl_lexer.ll"
2401 return SAMPLER2DRECT; 2410 return SAMPLER2DRECT;
2402 YY_BREAK 2411 YY_BREAK
2403 case 166: 2412 case 166:
2404 YY_RULE_SETUP 2413 YY_RULE_SETUP
2405 #line 426 "src/src/glsl/glsl_lexer.ll" 2414 #line 429 "src/src/glsl/glsl_lexer.ll"
2406 KEYWORD(110 || ES, 999, SAMPLER3DRECT); 2415 KEYWORD(110 || ES, 999, SAMPLER3DRECT);
2407 YY_BREAK 2416 YY_BREAK
2408 case 167: 2417 case 167:
2409 YY_RULE_SETUP 2418 YY_RULE_SETUP
2410 #line 427 "src/src/glsl/glsl_lexer.ll" 2419 #line 430 "src/src/glsl/glsl_lexer.ll"
2411 return SAMPLER2DRECTSHADOW; 2420 return SAMPLER2DRECTSHADOW;
2412 YY_BREAK 2421 YY_BREAK
2413 case 168: 2422 case 168:
2414 YY_RULE_SETUP 2423 YY_RULE_SETUP
2415 #line 428 "src/src/glsl/glsl_lexer.ll" 2424 #line 431 "src/src/glsl/glsl_lexer.ll"
2416 KEYWORD(110 || ES, 999, SIZEOF); 2425 KEYWORD(110 || ES, 999, SIZEOF);
2417 YY_BREAK 2426 YY_BREAK
2418 case 169: 2427 case 169:
2419 YY_RULE_SETUP 2428 YY_RULE_SETUP
2420 #line 429 "src/src/glsl/glsl_lexer.ll" 2429 #line 432 "src/src/glsl/glsl_lexer.ll"
2421 KEYWORD(110 || ES, 999, CAST); 2430 KEYWORD(110 || ES, 999, CAST);
2422 YY_BREAK 2431 YY_BREAK
2423 case 170: 2432 case 170:
2424 YY_RULE_SETUP 2433 YY_RULE_SETUP
2425 #line 430 "src/src/glsl/glsl_lexer.ll" 2434 #line 433 "src/src/glsl/glsl_lexer.ll"
2426 KEYWORD(110 || ES, 999, NAMESPACE); 2435 KEYWORD(110 || ES, 999, NAMESPACE);
2427 YY_BREAK 2436 YY_BREAK
2428 case 171: 2437 case 171:
2429 YY_RULE_SETUP 2438 YY_RULE_SETUP
2430 #line 431 "src/src/glsl/glsl_lexer.ll" 2439 #line 434 "src/src/glsl/glsl_lexer.ll"
2431 KEYWORD(110 || ES, 999, USING); 2440 KEYWORD(110 || ES, 999, USING);
2432 YY_BREAK 2441 YY_BREAK
2433 /* Additional reserved words in GLSL 1.20. */ 2442 /* Additional reserved words in GLSL 1.20. */
2434 case 172: 2443 case 172:
2435 YY_RULE_SETUP 2444 YY_RULE_SETUP
2436 #line 434 "src/src/glsl/glsl_lexer.ll" 2445 #line 437 "src/src/glsl/glsl_lexer.ll"
2437 KEYWORD(120, 130 || ES, LOWP); 2446 KEYWORD(120, 130 || ES, LOWP);
2438 YY_BREAK 2447 YY_BREAK
2439 case 173: 2448 case 173:
2440 YY_RULE_SETUP 2449 YY_RULE_SETUP
2441 #line 435 "src/src/glsl/glsl_lexer.ll" 2450 #line 438 "src/src/glsl/glsl_lexer.ll"
2442 KEYWORD(120, 130 || ES, MEDIUMP); 2451 KEYWORD(120, 130 || ES, MEDIUMP);
2443 YY_BREAK 2452 YY_BREAK
2444 case 174: 2453 case 174:
2445 YY_RULE_SETUP 2454 YY_RULE_SETUP
2446 #line 436 "src/src/glsl/glsl_lexer.ll" 2455 #line 439 "src/src/glsl/glsl_lexer.ll"
2447 KEYWORD(120, 130 || ES, HIGHP); 2456 KEYWORD(120, 130 || ES, HIGHP);
2448 YY_BREAK 2457 YY_BREAK
2449 case 175: 2458 case 175:
2450 YY_RULE_SETUP 2459 YY_RULE_SETUP
2451 #line 437 "src/src/glsl/glsl_lexer.ll" 2460 #line 440 "src/src/glsl/glsl_lexer.ll"
2452 KEYWORD(120, 130 || ES, PRECISION); 2461 KEYWORD(120, 130 || ES, PRECISION);
2453 YY_BREAK 2462 YY_BREAK
2454 /* Additional reserved words in GLSL 1.30. */ 2463 /* Additional reserved words in GLSL 1.30. */
2455 case 176: 2464 case 176:
2456 YY_RULE_SETUP 2465 YY_RULE_SETUP
2457 #line 440 "src/src/glsl/glsl_lexer.ll" 2466 #line 443 "src/src/glsl/glsl_lexer.ll"
2458 KEYWORD(130, 130, CASE); 2467 KEYWORD(130, 130, CASE);
2459 YY_BREAK 2468 YY_BREAK
2460 case 177: 2469 case 177:
2461 YY_RULE_SETUP 2470 YY_RULE_SETUP
2462 #line 441 "src/src/glsl/glsl_lexer.ll" 2471 #line 444 "src/src/glsl/glsl_lexer.ll"
2463 KEYWORD(130, 999, COMMON); 2472 KEYWORD(130, 999, COMMON);
2464 YY_BREAK 2473 YY_BREAK
2465 case 178: 2474 case 178:
2466 YY_RULE_SETUP 2475 YY_RULE_SETUP
2467 #line 442 "src/src/glsl/glsl_lexer.ll" 2476 #line 445 "src/src/glsl/glsl_lexer.ll"
2468 KEYWORD(130, 999, PARTITION); 2477 KEYWORD(130, 999, PARTITION);
2469 YY_BREAK 2478 YY_BREAK
2470 case 179: 2479 case 179:
2471 YY_RULE_SETUP 2480 YY_RULE_SETUP
2472 #line 443 "src/src/glsl/glsl_lexer.ll" 2481 #line 446 "src/src/glsl/glsl_lexer.ll"
2473 KEYWORD(130, 999, ACTIVE); 2482 KEYWORD(130, 999, ACTIVE);
2474 YY_BREAK 2483 YY_BREAK
2475 case 180: 2484 case 180:
2476 YY_RULE_SETUP 2485 YY_RULE_SETUP
2477 #line 444 "src/src/glsl/glsl_lexer.ll" 2486 #line 447 "src/src/glsl/glsl_lexer.ll"
2478 KEYWORD(130 || ES, 999, SUPERP); 2487 KEYWORD(130 || ES, 999, SUPERP);
2479 YY_BREAK 2488 YY_BREAK
2480 case 181: 2489 case 181:
2481 YY_RULE_SETUP 2490 YY_RULE_SETUP
2482 #line 445 "src/src/glsl/glsl_lexer.ll" 2491 #line 448 "src/src/glsl/glsl_lexer.ll"
2483 KEYWORD(130, 140, SAMPLERBUFFER); 2492 KEYWORD(130, 140, SAMPLERBUFFER);
2484 YY_BREAK 2493 YY_BREAK
2485 case 182: 2494 case 182:
2486 YY_RULE_SETUP 2495 YY_RULE_SETUP
2487 #line 446 "src/src/glsl/glsl_lexer.ll" 2496 #line 449 "src/src/glsl/glsl_lexer.ll"
2488 KEYWORD(130, 999, FILTER); 2497 KEYWORD(130, 999, FILTER);
2489 YY_BREAK 2498 YY_BREAK
2490 case 183: 2499 case 183:
2491 YY_RULE_SETUP 2500 YY_RULE_SETUP
2492 #line 447 "src/src/glsl/glsl_lexer.ll" 2501 #line 450 "src/src/glsl/glsl_lexer.ll"
2493 KEYWORD(130, 999, IMAGE1D); 2502 KEYWORD(130, 999, IMAGE1D);
2494 YY_BREAK 2503 YY_BREAK
2495 case 184: 2504 case 184:
2496 YY_RULE_SETUP 2505 YY_RULE_SETUP
2497 #line 448 "src/src/glsl/glsl_lexer.ll" 2506 #line 451 "src/src/glsl/glsl_lexer.ll"
2498 KEYWORD(130, 999, IMAGE2D); 2507 KEYWORD(130, 999, IMAGE2D);
2499 YY_BREAK 2508 YY_BREAK
2500 case 185: 2509 case 185:
2501 YY_RULE_SETUP 2510 YY_RULE_SETUP
2502 #line 449 "src/src/glsl/glsl_lexer.ll" 2511 #line 452 "src/src/glsl/glsl_lexer.ll"
2503 KEYWORD(130, 999, IMAGE3D); 2512 KEYWORD(130, 999, IMAGE3D);
2504 YY_BREAK 2513 YY_BREAK
2505 case 186: 2514 case 186:
2506 YY_RULE_SETUP 2515 YY_RULE_SETUP
2507 #line 450 "src/src/glsl/glsl_lexer.ll" 2516 #line 453 "src/src/glsl/glsl_lexer.ll"
2508 KEYWORD(130, 999, IMAGECUBE); 2517 KEYWORD(130, 999, IMAGECUBE);
2509 YY_BREAK 2518 YY_BREAK
2510 case 187: 2519 case 187:
2511 YY_RULE_SETUP 2520 YY_RULE_SETUP
2512 #line 451 "src/src/glsl/glsl_lexer.ll" 2521 #line 454 "src/src/glsl/glsl_lexer.ll"
2513 KEYWORD(130, 999, IIMAGE1D); 2522 KEYWORD(130, 999, IIMAGE1D);
2514 YY_BREAK 2523 YY_BREAK
2515 case 188: 2524 case 188:
2516 YY_RULE_SETUP 2525 YY_RULE_SETUP
2517 #line 452 "src/src/glsl/glsl_lexer.ll" 2526 #line 455 "src/src/glsl/glsl_lexer.ll"
2518 KEYWORD(130, 999, IIMAGE2D); 2527 KEYWORD(130, 999, IIMAGE2D);
2519 YY_BREAK 2528 YY_BREAK
2520 case 189: 2529 case 189:
2521 YY_RULE_SETUP 2530 YY_RULE_SETUP
2522 #line 453 "src/src/glsl/glsl_lexer.ll" 2531 #line 456 "src/src/glsl/glsl_lexer.ll"
2523 KEYWORD(130, 999, IIMAGE3D); 2532 KEYWORD(130, 999, IIMAGE3D);
2524 YY_BREAK 2533 YY_BREAK
2525 case 190: 2534 case 190:
2526 YY_RULE_SETUP 2535 YY_RULE_SETUP
2527 #line 454 "src/src/glsl/glsl_lexer.ll" 2536 #line 457 "src/src/glsl/glsl_lexer.ll"
2528 KEYWORD(130, 999, IIMAGECUBE); 2537 KEYWORD(130, 999, IIMAGECUBE);
2529 YY_BREAK 2538 YY_BREAK
2530 case 191: 2539 case 191:
2531 YY_RULE_SETUP 2540 YY_RULE_SETUP
2532 #line 455 "src/src/glsl/glsl_lexer.ll" 2541 #line 458 "src/src/glsl/glsl_lexer.ll"
2533 KEYWORD(130, 999, UIMAGE1D); 2542 KEYWORD(130, 999, UIMAGE1D);
2534 YY_BREAK 2543 YY_BREAK
2535 case 192: 2544 case 192:
2536 YY_RULE_SETUP 2545 YY_RULE_SETUP
2537 #line 456 "src/src/glsl/glsl_lexer.ll" 2546 #line 459 "src/src/glsl/glsl_lexer.ll"
2538 KEYWORD(130, 999, UIMAGE2D); 2547 KEYWORD(130, 999, UIMAGE2D);
2539 YY_BREAK 2548 YY_BREAK
2540 case 193: 2549 case 193:
2541 YY_RULE_SETUP 2550 YY_RULE_SETUP
2542 #line 457 "src/src/glsl/glsl_lexer.ll" 2551 #line 460 "src/src/glsl/glsl_lexer.ll"
2543 KEYWORD(130, 999, UIMAGE3D); 2552 KEYWORD(130, 999, UIMAGE3D);
2544 YY_BREAK 2553 YY_BREAK
2545 case 194: 2554 case 194:
2546 YY_RULE_SETUP 2555 YY_RULE_SETUP
2547 #line 458 "src/src/glsl/glsl_lexer.ll" 2556 #line 461 "src/src/glsl/glsl_lexer.ll"
2548 KEYWORD(130, 999, UIMAGECUBE); 2557 KEYWORD(130, 999, UIMAGECUBE);
2549 YY_BREAK 2558 YY_BREAK
2550 case 195: 2559 case 195:
2551 YY_RULE_SETUP 2560 YY_RULE_SETUP
2552 #line 459 "src/src/glsl/glsl_lexer.ll" 2561 #line 462 "src/src/glsl/glsl_lexer.ll"
2553 KEYWORD(130, 999, IMAGE1DARRAY); 2562 KEYWORD(130, 999, IMAGE1DARRAY);
2554 YY_BREAK 2563 YY_BREAK
2555 case 196: 2564 case 196:
2556 YY_RULE_SETUP 2565 YY_RULE_SETUP
2557 #line 460 "src/src/glsl/glsl_lexer.ll" 2566 #line 463 "src/src/glsl/glsl_lexer.ll"
2558 KEYWORD(130, 999, IMAGE2DARRAY); 2567 KEYWORD(130, 999, IMAGE2DARRAY);
2559 YY_BREAK 2568 YY_BREAK
2560 case 197: 2569 case 197:
2561 YY_RULE_SETUP 2570 YY_RULE_SETUP
2562 #line 461 "src/src/glsl/glsl_lexer.ll" 2571 #line 464 "src/src/glsl/glsl_lexer.ll"
2563 KEYWORD(130, 999, IIMAGE1DARRAY); 2572 KEYWORD(130, 999, IIMAGE1DARRAY);
2564 YY_BREAK 2573 YY_BREAK
2565 case 198: 2574 case 198:
2566 YY_RULE_SETUP 2575 YY_RULE_SETUP
2567 #line 462 "src/src/glsl/glsl_lexer.ll" 2576 #line 465 "src/src/glsl/glsl_lexer.ll"
2568 KEYWORD(130, 999, IIMAGE2DARRAY); 2577 KEYWORD(130, 999, IIMAGE2DARRAY);
2569 YY_BREAK 2578 YY_BREAK
2570 case 199: 2579 case 199:
2571 YY_RULE_SETUP 2580 YY_RULE_SETUP
2572 #line 463 "src/src/glsl/glsl_lexer.ll" 2581 #line 466 "src/src/glsl/glsl_lexer.ll"
2573 KEYWORD(130, 999, UIMAGE1DARRAY); 2582 KEYWORD(130, 999, UIMAGE1DARRAY);
2574 YY_BREAK 2583 YY_BREAK
2575 case 200: 2584 case 200:
2576 YY_RULE_SETUP 2585 YY_RULE_SETUP
2577 #line 464 "src/src/glsl/glsl_lexer.ll" 2586 #line 467 "src/src/glsl/glsl_lexer.ll"
2578 KEYWORD(130, 999, UIMAGE2DARRAY); 2587 KEYWORD(130, 999, UIMAGE2DARRAY);
2579 YY_BREAK 2588 YY_BREAK
2580 case 201: 2589 case 201:
2581 YY_RULE_SETUP 2590 YY_RULE_SETUP
2582 #line 465 "src/src/glsl/glsl_lexer.ll" 2591 #line 468 "src/src/glsl/glsl_lexer.ll"
2583 KEYWORD(130, 999, IMAGE1DSHADOW); 2592 KEYWORD(130, 999, IMAGE1DSHADOW);
2584 YY_BREAK 2593 YY_BREAK
2585 case 202: 2594 case 202:
2586 YY_RULE_SETUP 2595 YY_RULE_SETUP
2587 #line 466 "src/src/glsl/glsl_lexer.ll" 2596 #line 469 "src/src/glsl/glsl_lexer.ll"
2588 KEYWORD(130, 999, IMAGE2DSHADOW); 2597 KEYWORD(130, 999, IMAGE2DSHADOW);
2589 YY_BREAK 2598 YY_BREAK
2590 case 203: 2599 case 203:
2591 YY_RULE_SETUP 2600 YY_RULE_SETUP
2592 #line 467 "src/src/glsl/glsl_lexer.ll" 2601 #line 470 "src/src/glsl/glsl_lexer.ll"
2593 KEYWORD(130, 999, IMAGE1DARRAYSHADOW); 2602 KEYWORD(130, 999, IMAGE1DARRAYSHADOW);
2594 YY_BREAK 2603 YY_BREAK
2595 case 204: 2604 case 204:
2596 YY_RULE_SETUP 2605 YY_RULE_SETUP
2597 #line 468 "src/src/glsl/glsl_lexer.ll" 2606 #line 471 "src/src/glsl/glsl_lexer.ll"
2598 KEYWORD(130, 999, IMAGE2DARRAYSHADOW); 2607 KEYWORD(130, 999, IMAGE2DARRAYSHADOW);
2599 YY_BREAK 2608 YY_BREAK
2600 case 205: 2609 case 205:
2601 YY_RULE_SETUP 2610 YY_RULE_SETUP
2602 #line 469 "src/src/glsl/glsl_lexer.ll" 2611 #line 472 "src/src/glsl/glsl_lexer.ll"
2603 KEYWORD(130, 999, IMAGEBUFFER); 2612 KEYWORD(130, 999, IMAGEBUFFER);
2604 YY_BREAK 2613 YY_BREAK
2605 case 206: 2614 case 206:
2606 YY_RULE_SETUP 2615 YY_RULE_SETUP
2607 #line 470 "src/src/glsl/glsl_lexer.ll" 2616 #line 473 "src/src/glsl/glsl_lexer.ll"
2608 KEYWORD(130, 999, IIMAGEBUFFER); 2617 KEYWORD(130, 999, IIMAGEBUFFER);
2609 YY_BREAK 2618 YY_BREAK
2610 case 207: 2619 case 207:
2611 YY_RULE_SETUP 2620 YY_RULE_SETUP
2612 #line 471 "src/src/glsl/glsl_lexer.ll" 2621 #line 474 "src/src/glsl/glsl_lexer.ll"
2613 KEYWORD(130, 999, UIMAGEBUFFER); 2622 KEYWORD(130, 999, UIMAGEBUFFER);
2614 YY_BREAK 2623 YY_BREAK
2615 case 208: 2624 case 208:
2616 YY_RULE_SETUP 2625 YY_RULE_SETUP
2617 #line 472 "src/src/glsl/glsl_lexer.ll" 2626 #line 475 "src/src/glsl/glsl_lexer.ll"
2618 KEYWORD(130, 140 || yyextra->ARB_uniform_buffer_object_enable, ROW_MAJOR); 2627 KEYWORD(130, 140 || yyextra->ARB_uniform_buffer_object_enable, ROW_MAJOR);
2619 YY_BREAK 2628 YY_BREAK
2620 /* Additional reserved words in GLSL 1.40 */ 2629 /* Additional reserved words in GLSL 1.40 */
2621 case 209: 2630 case 209:
2622 YY_RULE_SETUP 2631 YY_RULE_SETUP
2623 #line 475 "src/src/glsl/glsl_lexer.ll" 2632 #line 478 "src/src/glsl/glsl_lexer.ll"
2624 KEYWORD(140, 140, ISAMPLER2DRECT); 2633 KEYWORD(140, 140, ISAMPLER2DRECT);
2625 YY_BREAK 2634 YY_BREAK
2626 case 210: 2635 case 210:
2627 YY_RULE_SETUP 2636 YY_RULE_SETUP
2628 #line 476 "src/src/glsl/glsl_lexer.ll" 2637 #line 479 "src/src/glsl/glsl_lexer.ll"
2629 KEYWORD(140, 140, USAMPLER2DRECT); 2638 KEYWORD(140, 140, USAMPLER2DRECT);
2630 YY_BREAK 2639 YY_BREAK
2631 case 211: 2640 case 211:
2632 YY_RULE_SETUP 2641 YY_RULE_SETUP
2633 #line 477 "src/src/glsl/glsl_lexer.ll" 2642 #line 480 "src/src/glsl/glsl_lexer.ll"
2634 KEYWORD(140, 140, ISAMPLERBUFFER); 2643 KEYWORD(140, 140, ISAMPLERBUFFER);
2635 YY_BREAK 2644 YY_BREAK
2636 case 212: 2645 case 212:
2637 YY_RULE_SETUP 2646 YY_RULE_SETUP
2638 #line 478 "src/src/glsl/glsl_lexer.ll" 2647 #line 481 "src/src/glsl/glsl_lexer.ll"
2639 KEYWORD(140, 140, USAMPLERBUFFER); 2648 KEYWORD(140, 140, USAMPLERBUFFER);
2640 YY_BREAK 2649 YY_BREAK
2641 case 213: 2650 case 213:
2642 YY_RULE_SETUP 2651 YY_RULE_SETUP
2643 #line 480 "src/src/glsl/glsl_lexer.ll" 2652 #line 483 "src/src/glsl/glsl_lexer.ll"
2644 { 2653 {
2645 struct _mesa_glsl_parse_state *state = yyextra; 2654 struct _mesa_glsl_parse_state *state = yyextra;
2646 void *ctx = state; 2655 void *ctx = state;
2647 yylval->identifier = ralloc_strdup(ctx, yytext); 2656 yylval->identifier = ralloc_strdup(ctx, yytext);
2648 return classify_identifier(state, yytext); 2657 return classify_identifier(state, yytext);
2649 } 2658 }
2650 YY_BREAK 2659 YY_BREAK
2651 case 214: 2660 case 214:
2652 YY_RULE_SETUP 2661 YY_RULE_SETUP
2653 #line 487 "src/src/glsl/glsl_lexer.ll" 2662 #line 490 "src/src/glsl/glsl_lexer.ll"
2654 { return yytext[0]; } 2663 { return yytext[0]; }
2655 YY_BREAK 2664 YY_BREAK
2656 case 215: 2665 case 215:
2657 YY_RULE_SETUP 2666 YY_RULE_SETUP
2658 #line 489 "src/src/glsl/glsl_lexer.ll" 2667 #line 492 "src/src/glsl/glsl_lexer.ll"
2659 ECHO; 2668 ECHO;
2660 YY_BREAK 2669 YY_BREAK
2661 #line 2662 "src/chromium_gensrc/mesa/glsl_lexer.cc" 2670 #line 2671 "src/chromium_gensrc/mesa/glsl_lexer.cc"
2662 case YY_STATE_EOF(INITIAL): 2671 case YY_STATE_EOF(INITIAL):
2663 case YY_STATE_EOF(PP): 2672 case YY_STATE_EOF(PP):
2664 case YY_STATE_EOF(PRAGMA): 2673 case YY_STATE_EOF(PRAGMA):
2665 yyterminate(); 2674 yyterminate();
2666 2675
2667 case YY_END_OF_BUFFER: 2676 case YY_END_OF_BUFFER:
2668 { 2677 {
2669 /* Amount of text matched not including the EOB char. */ 2678 /* Amount of text matched not including the EOB char. */
2670 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; 2679 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2671 2680
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2785 goto yy_find_action; 2794 goto yy_find_action;
2786 } 2795 }
2787 break; 2796 break;
2788 } 2797 }
2789 2798
2790 default: 2799 default:
2791 YY_FATAL_ERROR( 2800 YY_FATAL_ERROR(
2792 "fatal flex scanner internal error--no action found" ); 2801 "fatal flex scanner internal error--no action found" );
2793 } /* end of action switch */ 2802 } /* end of action switch */
2794 } /* end of scanning one token */ 2803 } /* end of scanning one token */
2804 } /* end of user's declarations */
2795 } /* end of _mesa_glsl_lex */ 2805 } /* end of _mesa_glsl_lex */
2796 2806
2797 /* yy_get_next_buffer - try to read in a new buffer 2807 /* yy_get_next_buffer - try to read in a new buffer
2798 * 2808 *
2799 * Returns a code representing an action: 2809 * Returns a code representing an action:
2800 * EOB_ACT_LAST_MATCH - 2810 * EOB_ACT_LAST_MATCH -
2801 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 2811 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2802 * EOB_ACT_END_OF_FILE - end of file 2812 * EOB_ACT_END_OF_FILE - end of file
2803 */ 2813 */
2804 static int yy_get_next_buffer (yyscan_t yyscanner) 2814 static int yy_get_next_buffer (yyscan_t yyscanner)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2841 *(dest++) = *(source++); 2851 *(dest++) = *(source++);
2842 2852
2843 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 2853 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2844 /* don't do the read, it's not guaranteed to return an EOF, 2854 /* don't do the read, it's not guaranteed to return an EOF,
2845 * just force an EOF 2855 * just force an EOF
2846 */ 2856 */
2847 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; 2857 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2848 2858
2849 else 2859 else
2850 { 2860 {
2851 » » » int num_to_read = 2861 » » » yy_size_t num_to_read =
2852 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 2862 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2853 2863
2854 while ( num_to_read <= 0 ) 2864 while ( num_to_read <= 0 )
2855 { /* Not enough room in the buffer - grow it. */ 2865 { /* Not enough room in the buffer - grow it. */
2856 2866
2857 /* just a shorter name for the current buffer */ 2867 /* just a shorter name for the current buffer */
2858 » » » YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 2868 » » » YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2859 2869
2860 int yy_c_buf_p_offset = 2870 int yy_c_buf_p_offset =
2861 (int) (yyg->yy_c_buf_p - b->yy_ch_buf); 2871 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2862 2872
2863 if ( b->yy_is_our_buffer ) 2873 if ( b->yy_is_our_buffer )
2864 { 2874 {
2865 » » » » int new_size = b->yy_buf_size * 2; 2875 » » » » yy_size_t new_size = b->yy_buf_size * 2;
2866 2876
2867 if ( new_size <= 0 ) 2877 if ( new_size <= 0 )
2868 b->yy_buf_size += b->yy_buf_size / 8; 2878 b->yy_buf_size += b->yy_buf_size / 8;
2869 else 2879 else
2870 b->yy_buf_size *= 2; 2880 b->yy_buf_size *= 2;
2871 2881
2872 b->yy_ch_buf = (char *) 2882 b->yy_ch_buf = (char *)
2873 /* Include room in for 2 EOB chars. */ 2883 /* Include room in for 2 EOB chars. */
2874 _mesa_glsl_realloc((void *) b->yy_ch_buf ,b->yy_buf_size + 2 ,yyscanner ); 2884 _mesa_glsl_realloc((void *) b->yy_ch_buf ,b->yy_buf_size + 2 ,yyscanner );
2875 } 2885 }
(...skipping 10 matching lines...) Expand all
2886 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 2896 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2887 number_to_move - 1; 2897 number_to_move - 1;
2888 2898
2889 } 2899 }
2890 2900
2891 if ( num_to_read > YY_READ_BUF_SIZE ) 2901 if ( num_to_read > YY_READ_BUF_SIZE )
2892 num_to_read = YY_READ_BUF_SIZE; 2902 num_to_read = YY_READ_BUF_SIZE;
2893 2903
2894 /* Read in more data. */ 2904 /* Read in more data. */
2895 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]) , 2905 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]) ,
2896 » » » yyg->yy_n_chars, (size_t) num_to_read ); 2906 » » » yyg->yy_n_chars, num_to_read );
2897 2907
2898 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; 2908 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2899 } 2909 }
2900 2910
2901 if ( yyg->yy_n_chars == 0 ) 2911 if ( yyg->yy_n_chars == 0 )
2902 { 2912 {
2903 if ( number_to_move == YY_MORE_ADJ ) 2913 if ( number_to_move == YY_MORE_ADJ )
2904 { 2914 {
2905 ret_val = EOB_ACT_END_OF_FILE; 2915 ret_val = EOB_ACT_END_OF_FILE;
2906 _mesa_glsl_restart(yyin ,yyscanner); 2916 _mesa_glsl_restart(yyin ,yyscanner);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2984 } 2994 }
2985 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 2995 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2986 { 2996 {
2987 yy_current_state = (int) yy_def[yy_current_state]; 2997 yy_current_state = (int) yy_def[yy_current_state];
2988 if ( yy_current_state >= 867 ) 2998 if ( yy_current_state >= 867 )
2989 yy_c = yy_meta[(unsigned int) yy_c]; 2999 yy_c = yy_meta[(unsigned int) yy_c];
2990 } 3000 }
2991 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_ c]; 3001 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_ c];
2992 yy_is_jam = (yy_current_state == 866); 3002 yy_is_jam = (yy_current_state == 866);
2993 3003
3004 (void)yyg;
2994 return yy_is_jam ? 0 : yy_current_state; 3005 return yy_is_jam ? 0 : yy_current_state;
2995 } 3006 }
2996 3007
2997 #ifndef YY_NO_INPUT 3008 #ifndef YY_NO_INPUT
2998 #ifdef __cplusplus 3009 #ifdef __cplusplus
2999 static int yyinput (yyscan_t yyscanner) 3010 static int yyinput (yyscan_t yyscanner)
3000 #else 3011 #else
3001 static int input (yyscan_t yyscanner) 3012 static int input (yyscan_t yyscanner)
3002 #endif 3013 #endif
3003 3014
3004 { 3015 {
3005 int c; 3016 int c;
3006 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3017 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3007 3018
3008 *yyg->yy_c_buf_p = yyg->yy_hold_char; 3019 *yyg->yy_c_buf_p = yyg->yy_hold_char;
3009 3020
3010 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 3021 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
3011 { 3022 {
3012 /* yy_c_buf_p now points to the character we want to return. 3023 /* yy_c_buf_p now points to the character we want to return.
3013 * If this occurs *before* the EOB characters, then it's a 3024 * If this occurs *before* the EOB characters, then it's a
3014 * valid NUL; if not, then we've hit the end of the buffer. 3025 * valid NUL; if not, then we've hit the end of the buffer.
3015 */ 3026 */
3016 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg- >yy_n_chars] ) 3027 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg- >yy_n_chars] )
3017 /* This was really a NUL. */ 3028 /* This was really a NUL. */
3018 *yyg->yy_c_buf_p = '\0'; 3029 *yyg->yy_c_buf_p = '\0';
3019 3030
3020 else 3031 else
3021 { /* need more input */ 3032 { /* need more input */
3022 » » » int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; 3033 » » » yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
3023 ++yyg->yy_c_buf_p; 3034 ++yyg->yy_c_buf_p;
3024 3035
3025 switch ( yy_get_next_buffer( yyscanner ) ) 3036 switch ( yy_get_next_buffer( yyscanner ) )
3026 { 3037 {
3027 case EOB_ACT_LAST_MATCH: 3038 case EOB_ACT_LAST_MATCH:
3028 /* This happens because yy_g_n_b() 3039 /* This happens because yy_g_n_b()
3029 * sees that we've accumulated a 3040 * sees that we've accumulated a
3030 * token and flags that we need to 3041 * token and flags that we need to
3031 * try matching the token before 3042 * try matching the token before
3032 * proceeding. But for input(), 3043 * proceeding. But for input(),
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
3294 _mesa_glsl__load_buffer_state(yyscanner ); 3305 _mesa_glsl__load_buffer_state(yyscanner );
3295 yyg->yy_did_buffer_switch_on_eof = 1; 3306 yyg->yy_did_buffer_switch_on_eof = 1;
3296 } 3307 }
3297 } 3308 }
3298 3309
3299 /* Allocates the stack if it does not exist. 3310 /* Allocates the stack if it does not exist.
3300 * Guarantees space for at least one push. 3311 * Guarantees space for at least one push.
3301 */ 3312 */
3302 static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner) 3313 static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner)
3303 { 3314 {
3304 » int num_to_alloc; 3315 » yy_size_t num_to_alloc;
3305 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3316 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3306 3317
3307 if (!yyg->yy_buffer_stack) { 3318 if (!yyg->yy_buffer_stack) {
3308 3319
3309 /* First allocation is just for 2 elements, since we don't know if this 3320 /* First allocation is just for 2 elements, since we don't know if this
3310 * scanner will even need a stack. We use 2 instead of 1 to avoi d an 3321 * scanner will even need a stack. We use 2 instead of 1 to avoi d an
3311 * immediate realloc on the next call. 3322 * immediate realloc on the next call.
3312 */ 3323 */
3313 num_to_alloc = 1; 3324 num_to_alloc = 1;
3314 yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_allo c 3325 yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_allo c
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
3392 return _mesa_glsl__scan_bytes(yystr,strlen(yystr) ,yyscanner); 3403 return _mesa_glsl__scan_bytes(yystr,strlen(yystr) ,yyscanner);
3393 } 3404 }
3394 3405
3395 /** Setup the input buffer state to scan the given bytes. The next call to _mesa _glsl_lex() will 3406 /** Setup the input buffer state to scan the given bytes. The next call to _mesa _glsl_lex() will
3396 * scan from a @e copy of @a bytes. 3407 * scan from a @e copy of @a bytes.
3397 * @param yybytes the byte buffer to scan 3408 * @param yybytes the byte buffer to scan
3398 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 3409 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3399 * @param yyscanner The scanner object. 3410 * @param yyscanner The scanner object.
3400 * @return the newly allocated buffer state object. 3411 * @return the newly allocated buffer state object.
3401 */ 3412 */
3402 YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, int _yybytes_l en , yyscan_t yyscanner) 3413 YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, yy_size_t _yyb ytes_len , yyscan_t yyscanner)
3403 { 3414 {
3404 YY_BUFFER_STATE b; 3415 YY_BUFFER_STATE b;
3405 char *buf; 3416 char *buf;
3406 yy_size_t n; 3417 yy_size_t n;
3407 » int i; 3418 » yy_size_t i;
3408 3419
3409 /* Get memory for full buffer, including space for trailing EOB's. */ 3420 /* Get memory for full buffer, including space for trailing EOB's. */
3410 n = _yybytes_len + 2; 3421 n = _yybytes_len + 2;
3411 buf = (char *) _mesa_glsl_alloc(n ,yyscanner ); 3422 buf = (char *) _mesa_glsl_alloc(n ,yyscanner );
3412 if ( ! buf ) 3423 if ( ! buf )
3413 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_bytes ()" ); 3424 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_bytes ()" );
3414 3425
3415 for ( i = 0; i < _yybytes_len; ++i ) 3426 for ( i = 0; i < _yybytes_len; ++i )
3416 buf[i] = yybytes[i]; 3427 buf[i] = yybytes[i];
3417 3428
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
3507 */ 3518 */
3508 FILE *_mesa_glsl_get_out (yyscan_t yyscanner) 3519 FILE *_mesa_glsl_get_out (yyscan_t yyscanner)
3509 { 3520 {
3510 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3521 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3511 return yyout; 3522 return yyout;
3512 } 3523 }
3513 3524
3514 /** Get the length of the current token. 3525 /** Get the length of the current token.
3515 * @param yyscanner The scanner object. 3526 * @param yyscanner The scanner object.
3516 */ 3527 */
3517 int _mesa_glsl_get_leng (yyscan_t yyscanner) 3528 yy_size_t _mesa_glsl_get_leng (yyscan_t yyscanner)
3518 { 3529 {
3519 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3530 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3520 return yyleng; 3531 return yyleng;
3521 } 3532 }
3522 3533
3523 /** Get the current token. 3534 /** Get the current token.
3524 * @param yyscanner The scanner object. 3535 * @param yyscanner The scanner object.
3525 */ 3536 */
3526 3537
3527 char *_mesa_glsl_get_text (yyscan_t yyscanner) 3538 char *_mesa_glsl_get_text (yyscan_t yyscanner)
(...skipping 15 matching lines...) Expand all
3543 /** Set the current line number. 3554 /** Set the current line number.
3544 * @param line_number 3555 * @param line_number
3545 * @param yyscanner The scanner object. 3556 * @param yyscanner The scanner object.
3546 */ 3557 */
3547 void _mesa_glsl_set_lineno (int line_number , yyscan_t yyscanner) 3558 void _mesa_glsl_set_lineno (int line_number , yyscan_t yyscanner)
3548 { 3559 {
3549 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3560 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3550 3561
3551 /* lineno is only valid if an input buffer exists. */ 3562 /* lineno is only valid if an input buffer exists. */
3552 if (! YY_CURRENT_BUFFER ) 3563 if (! YY_CURRENT_BUFFER )
3553 yy_fatal_error( "_mesa_glsl_set_lineno called with no buffer" , yysca nner); 3564 YY_FATAL_ERROR( "_mesa_glsl_set_lineno called with no buffer" );
3554 3565
3555 yylineno = line_number; 3566 yylineno = line_number;
3556 } 3567 }
3557 3568
3558 /** Set the current column. 3569 /** Set the current column.
3559 * @param line_number 3570 * @param line_number
3560 * @param yyscanner The scanner object. 3571 * @param yyscanner The scanner object.
3561 */ 3572 */
3562 void _mesa_glsl_set_column (int column_no , yyscan_t yyscanner) 3573 void _mesa_glsl_set_column (int column_no , yyscan_t yyscanner)
3563 { 3574 {
3564 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3575 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3565 3576
3566 /* column is only valid if an input buffer exists. */ 3577 /* column is only valid if an input buffer exists. */
3567 if (! YY_CURRENT_BUFFER ) 3578 if (! YY_CURRENT_BUFFER )
3568 yy_fatal_error( "_mesa_glsl_set_column called with no buffer" , yysca nner); 3579 YY_FATAL_ERROR( "_mesa_glsl_set_column called with no buffer" );
3569 3580
3570 yycolumn = column_no; 3581 yycolumn = column_no;
3571 } 3582 }
3572 3583
3573 /** Set the input stream. This does not discard the current 3584 /** Set the input stream. This does not discard the current
3574 * input buffer. 3585 * input buffer.
3575 * @param in_str A readable stream. 3586 * @param in_str A readable stream.
3576 * @param yyscanner The scanner object. 3587 * @param yyscanner The scanner object.
3577 * @see _mesa_glsl__switch_to_buffer 3588 * @see _mesa_glsl__switch_to_buffer
3578 */ 3589 */
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
3794 return (void *) realloc( (char *) ptr, size ); 3805 return (void *) realloc( (char *) ptr, size );
3795 } 3806 }
3796 3807
3797 void _mesa_glsl_free (void * ptr , yyscan_t yyscanner) 3808 void _mesa_glsl_free (void * ptr , yyscan_t yyscanner)
3798 { 3809 {
3799 free( (char *) ptr ); /* see _mesa_glsl_realloc() for (char *) cast */ 3810 free( (char *) ptr ); /* see _mesa_glsl_realloc() for (char *) cast */
3800 } 3811 }
3801 3812
3802 #define YYTABLES_NAME "yytables" 3813 #define YYTABLES_NAME "yytables"
3803 3814
3804 #line 489 "src/src/glsl/glsl_lexer.ll" 3815 #line 491 "src/src/glsl/glsl_lexer.ll"
3805 3816
3806 3817
3807 3818
3808 int 3819 int
3809 classify_identifier(struct _mesa_glsl_parse_state *state, const char *name) 3820 classify_identifier(struct _mesa_glsl_parse_state *state, const char *name)
3810 { 3821 {
3811 if (state->symbols->get_variable(name) || state->symbols->get_function(name)) 3822 if (state->symbols->get_variable(name) || state->symbols->get_function(name))
3812 return IDENTIFIER; 3823 return IDENTIFIER;
3813 else if (state->symbols->get_type(name)) 3824 else if (state->symbols->get_type(name))
3814 return TYPE_IDENTIFIER; 3825 return TYPE_IDENTIFIER;
3815 else 3826 else
3816 return NEW_IDENTIFIER; 3827 return NEW_IDENTIFIER;
3817 } 3828 }
3818 3829
3819 void 3830 void
3820 _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string) 3831 _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
3821 { 3832 {
3822 _mesa_glsl_lex_init_extra(state,& state->scanner); 3833 _mesa_glsl_lex_init_extra(state,& state->scanner);
3823 _mesa_glsl__scan_string(string,state->scanner); 3834 _mesa_glsl__scan_string(string,state->scanner);
3824 } 3835 }
3825 3836
3826 void 3837 void
3827 _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state) 3838 _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state)
3828 { 3839 {
3829 _mesa_glsl_lex_destroy(state->scanner); 3840 _mesa_glsl_lex_destroy(state->scanner);
3830 } 3841 }
3831 3842
OLDNEW
« no previous file with comments | « no previous file | src/glsl/glsl_lexer.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698