From 8f38aff9b5dd42ef963532fe5fc618e8bafa218a Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 19 May 2010 10:01:29 -0700 Subject: Add a wrapper function around the lexer. We rename the generated lexer from yylex to glcpp_lex. Then we implement our own yylex function in glcpp-parse.y that calls glcpp_lex. This doesn't change the behavior at all yet, but gives us a place where we can do implement alternate lexing in the future. (We want this because instead of re-lexing from strings for macro expansion, we want to lex from pre-parsed token lists. We need this so that when we terminate recursion due to an already active macro expansion, we can ensure that that symbol never gets expanded again later.) --- glcpp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'glcpp.h') diff --git a/glcpp.h b/glcpp.h index 81f7d14c5b..6aabf6f182 100644 --- a/glcpp.h +++ b/glcpp.h @@ -128,13 +128,13 @@ glcpp_parser_pop_expansion (glcpp_parser_t *parser); /* Generated by glcpp-lex.l to glcpp-lex.c */ int -yylex_init_extra (glcpp_parser_t *parser, yyscan_t* scanner); +glcpp_lex_init_extra (glcpp_parser_t *parser, yyscan_t* scanner); int -yylex (yyscan_t scanner); +glcpp_lex (yyscan_t scanner); int -yylex_destroy (yyscan_t scanner); +glcpp_lex_destroy (yyscan_t scanner); /* Generated by glcpp-parse.y to glcpp-parse.c */ -- cgit v1.2.3