From 572fe066da96d77f2ead48d7b9806b2796d79f5a Mon Sep 17 00:00:00 2001 From: John Johansen Date: Sun, 2 Feb 2014 19:23:10 -1000 Subject: [PATCH] The preprocessing output is broken, in a couple of places includes come out like #include ##included which is wrong because #include by itself is broken, and since -p is supposed to be removing includes, it should not be directly echoed any keyword in the keyword table is double echoed ownerowner /{run,dev}/shm/pulse-shm* rwk Signed-off-by: John Johansen Acked-by: Steve Beattie --- parser/parser_lex.l | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/parser/parser_lex.l b/parser/parser_lex.l index ad2f0f748..1938297d7 100644 --- a/parser/parser_lex.l +++ b/parser/parser_lex.l @@ -488,7 +488,12 @@ LT_EQUAL <= } } -#include/.*\r?\n { PUSH(INCLUDE); } +#include/.*\r?\n { + /* Don't use push here as we don't want #include echoed out. It needs + * to be handled specially + */ + yy_push_state(INCLUDE); +} #.*\r?\n { /* normal comment */ DUMP_AND_DEBUG("comment(%d): %s\n", current_lineno, yytext); @@ -536,7 +541,6 @@ LT_EQUAL <= {OPEN_PAREN} { PUSH_AND_RETURN(LIST_VAL_MODE, TOK_OPENPAREN); } {VARIABLE_NAME} { - DUMP_PREPROCESS; int token = get_keyword_token(yytext); int state = INITIAL;