Signed-off-by: Daniel Stone <daniel@fooishbar.org>
$(BASE_CFLAGS) \
$(XMALLOC_ZERO_CFLAGS)
$(BASE_CFLAGS) \
$(XMALLOC_ZERO_CFLAGS)
AM_YFLAGS = -d
xkbcommonincludedir = $(includedir)/xkbcommon
AM_YFLAGS = -d
xkbcommonincludedir = $(includedir)/xkbcommon
scanner_error(YYLTYPE *loc, void *scanner, const char *msg);
int
scanner_error(YYLTYPE *loc, void *scanner, const char *msg);
int
-yylex(YYSTYPE *val, YYLTYPE *loc, void *scanner);
+_xkbcommon_lex(YYSTYPE *val, YYLTYPE *loc, void *scanner);
#include "parser-priv.h"
static void
#include "parser-priv.h"
static void
-yyerror(struct YYLTYPE *loc, struct parser_param *param, const char *msg)
+_xkbcommon_error(struct YYLTYPE *loc, struct parser_param *param, const char *msg)
{
scanner_error(loc, param->scanner, msg);
}
{
scanner_error(loc, param->scanner, msg);
}
#define scanner param->scanner
%}
#define scanner param->scanner
%}
+%name-prefix "_xkbcommon_"
%define api.pure
%locations
%lex-param { void *scanner }
%define api.pure
%locations
%lex-param { void *scanner }
+%option prefix="_xkbcommon_"
%option reentrant
%option extra-type="struct scanner_extra *"
%option bison-bridge bison-locations
%option reentrant
%option extra-type="struct scanner_extra *"
%option bison-bridge bison-locations
return false;
state = yy_scan_string(string, param.scanner);
return false;
state = yy_scan_string(string, param.scanner);
+ ret = _xkbcommon_parse(¶m);
yy_delete_buffer(state, param.scanner);
yy_delete_buffer(state, param.scanner);
- yylex_destroy(param.scanner);
+ _xkbcommon_lex_destroy(param.scanner);
free(extra.scanFile);
if (ret != 0)
return false;
free(extra.scanFile);
if (ret != 0)
return false;
if (!extra.scanFile)
return false;
if (!extra.scanFile)
return false;
- yyset_in(file, param.scanner);
- ret = yyparse(¶m);
- yylex_destroy(param.scanner);
+ _xkbcommon_set_in(file, param.scanner);
+ ret = _xkbcommon_parse(¶m);
+ _xkbcommon_lex_destroy(param.scanner);
free(extra.scanFile);
if (ret != 0)
return false;
free(extra.scanFile);
if (ret != 0)
return false;