From: Carl Worth Date: Wed, 19 May 2010 17:05:40 +0000 (-0700) Subject: Rename yylex to glcpp_parser_lex and give it a glcpp_parser_t* argument. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0293b2e2dd81fabd3ecb71e036a99621801e1c94;p=mesa.git Rename yylex to glcpp_parser_lex and give it a glcpp_parser_t* argument. Much cleaner this way, (and now our custom lex function has access to all the parser state which it will need). --- diff --git a/glcpp-parse.y b/glcpp-parse.y index 6ef1cae0eca..04bac00e9f9 100644 --- a/glcpp-parse.y +++ b/glcpp-parse.y @@ -82,8 +82,10 @@ _argument_list_length (argument_list_t *list); string_list_t * _argument_list_member_at (argument_list_t *list, int index); +#define yylex glcpp_parser_lex + static int -yylex (yyscan_t scanner); +glcpp_parser_lex (glcpp_parser_t *parser); %} @@ -94,7 +96,7 @@ yylex (yyscan_t scanner); } %parse-param {glcpp_parser_t *parser} -%lex-param {void *scanner} +%lex-param {glcpp_parser_t *parser} %token DEFINE FUNC_MACRO IDENTIFIER NEWLINE OBJ_MACRO REPLACEMENT TOKEN UNDEF %type argument_word FUNC_MACRO IDENTIFIER OBJ_MACRO REPLACEMENT TOKEN @@ -647,7 +649,7 @@ _expand_function_macro (glcpp_parser_t *parser, } static int -yylex (yyscan_t scanner) +glcpp_parser_lex (glcpp_parser_t *parser) { - return glcpp_lex (scanner); + return glcpp_lex (parser->scanner); }