Use more modern bison %parse-param and %lex-param rather than #defined YYPARSE_PARAM and YYLEX_PARAM. This should make it build across a broader range of modern versions of bison, as well as avoid void* and type casting.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25746 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
8922ce7353
commit
6b57784690
4 changed files with 9 additions and 9 deletions
|
|
@ -97,15 +97,15 @@ using namespace glslang;
|
|||
|
||||
%{
|
||||
|
||||
#define YYPARSE_PARAM voidParseContext
|
||||
#define parseContext (*(TParseContext*)voidParseContext)
|
||||
#define YYLEX_PARAM parseContext
|
||||
#define yyerror(msg) parseContext.parserError(msg)
|
||||
#define parseContext (*pParseContext)
|
||||
#define yyerror(context, msg) context->parserError(msg)
|
||||
|
||||
extern int yylex(YYSTYPE*, TParseContext&);
|
||||
|
||||
%}
|
||||
|
||||
%parse-param {glslang::TParseContext* pParseContext}
|
||||
%lex-param {parseContext}
|
||||
%pure_parser // enable thread safety
|
||||
%expect 1 // One shift reduce conflict because of if | else
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue