Zebediah Figura : vkd3d-shader: Use "hlsl_yy" as an API prefix for bison and flex definitions.
Alexandre Julliard
julliard at winehq.org
Fri Feb 12 14:34:37 CST 2021
Module: vkd3d
Branch: master
Commit: df3773ff7ec24bebb2ab7c97335db0f75a0ccb69
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=df3773ff7ec24bebb2ab7c97335db0f75a0ccb69
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Fri Feb 12 10:48:53 2021 -0600
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: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
libs/vkd3d-shader/hlsl.l | 16 ++++++++--------
libs/vkd3d-shader/hlsl.y | 6 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.l b/libs/vkd3d-shader/hlsl.l
index 7e1fe14..d9fd43d 100644
--- a/libs/vkd3d-shader/hlsl.l
+++ b/libs/vkd3d-shader/hlsl.l
@@ -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;
}
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
index 8fc7f82..f0280fc 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -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}
More information about the wine-cvs
mailing list