"illegal use of reserved word `%s'", yytext); \
return ERROR_TOK; \
} else { \
- void *mem_ctx = yyextra; \
- yylval->identifier = ralloc_strdup(mem_ctx, yytext); \
+ void *mem_ctx = yyextra->linalloc; \
+ yylval->identifier = linear_strdup(mem_ctx, yytext); \
return classify_identifier(yyextra, yytext); \
} \
} while (0)
<PP>[ \t\r]* { }
<PP>: return COLON;
<PP>[_a-zA-Z][_a-zA-Z0-9]* {
- void *mem_ctx = yyextra;
- yylval->identifier = ralloc_strdup(mem_ctx, yytext);
+ void *mem_ctx = yyextra->linalloc;
+ yylval->identifier = linear_strdup(mem_ctx, yytext);
return IDENTIFIER;
}
<PP>[1-9][0-9]* {
|| yyextra->ARB_tessellation_shader_enable) {
return LAYOUT_TOK;
} else {
- void *mem_ctx = yyextra;
- yylval->identifier = ralloc_strdup(mem_ctx, yytext);
+ void *mem_ctx = yyextra->linalloc;
+ yylval->identifier = linear_strdup(mem_ctx, yytext);
return classify_identifier(yyextra, yytext);
}
}
[_a-zA-Z][_a-zA-Z0-9]* {
struct _mesa_glsl_parse_state *state = yyextra;
- void *ctx = state;
+ void *ctx = state->linalloc;
if (state->es_shader && strlen(yytext) > 1024) {
_mesa_glsl_error(yylloc, state,
"Identifier `%s' exceeds 1024 characters",
yytext);
} else {
- yylval->identifier = ralloc_strdup(ctx, yytext);
+ yylval->identifier = linear_strdup(ctx, yytext);
}
return classify_identifier(state, yytext);
}