mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
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@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e3e0c26475
commit
df3773ff7e
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user