Skip to content
Snippets Groups Projects
Commit df3773ff authored by Elizabeth Figura's avatar Elizabeth Figura Committed by Alexandre Julliard
Browse files

vkd3d-shader: Use "hlsl_yy" as an API prefix for bison and flex definitions.


So as to differentiate their API from our internal functions.

Signed-off-by: default avatarZebediah Figura <zfigura@codeweavers.com>
Signed-off-by: default avatarMatteo Bruni <mbruni@codeweavers.com>
Signed-off-by: default avatarHenri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent e3e0c264
Branches
Tags
No related merge requests found
......@@ -24,10 +24,10 @@
#include "hlsl.h"
#include "hlsl.tab.h"
#define YYSTYPE HLSL_STYPE
#define YYLTYPE HLSL_LTYPE
#define YYSTYPE HLSL_YYSTYPE
#define YYLTYPE HLSL_YYLTYPE
static void update_location(struct hlsl_ctx *ctx, HLSL_LTYPE *loc);
static void update_location(struct hlsl_ctx *ctx, YYLTYPE *loc);
#define YY_USER_ACTION update_location(yyget_extra(yyscanner), yyget_lloc(yyscanner));
......@@ -40,7 +40,7 @@ static void update_location(struct hlsl_ctx *ctx, HLSL_LTYPE *loc);
%option noinput
%option nounput
%option noyywrap
%option prefix="hlsl_"
%option prefix="hlsl_yy"
%option reentrant
%x pp pp_line pp_pragma pp_ignore
......@@ -278,7 +278,7 @@ row_major {return KW_ROW_MAJOR; }
%%
static void update_location(struct hlsl_ctx *ctx, HLSL_LTYPE *lloc)
static void update_location(struct hlsl_ctx *ctx, YYLTYPE *lloc)
{
lloc->file = ctx->source_file;
lloc->col = ctx->column;
......@@ -292,12 +292,12 @@ int hlsl_lexer_compile(struct hlsl_ctx *ctx, const char *text, const char *entry
int ret;
yylex_init_extra(ctx, &ctx->scanner);
buffer = hlsl__scan_string(text, ctx->scanner);
hlsl__switch_to_buffer(buffer, ctx->scanner);
buffer = yy_scan_string(text, ctx->scanner);
yy_switch_to_buffer(buffer, ctx->scanner);
ret = hlsl_parser_compile(ctx, entrypoint);
hlsl__delete_buffer(buffer, ctx->scanner);
yy_delete_buffer(buffer, ctx->scanner);
yylex_destroy(ctx->scanner);
return ret;
}
......@@ -26,7 +26,7 @@
#include "hlsl.h"
#include <stdio.h>
#define HLSL_LTYPE struct source_location
#define HLSL_YYLTYPE struct source_location
struct parse_parameter
{
......@@ -102,7 +102,7 @@ enum parse_assign_op
%code provides
{
int hlsl_lex(HLSL_STYPE *yylval_param, HLSL_LTYPE *yylloc_param, void *yyscanner);
int yylex(HLSL_YYSTYPE *yylval_param, HLSL_YYLTYPE *yylloc_param, void *yyscanner);
}
......@@ -1496,7 +1496,7 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
%locations
%define parse.error verbose
%define api.prefix {hlsl_}
%define api.prefix {hlsl_yy}
%define api.pure full
%expect 1
%lex-param {yyscan_t scanner}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment