From 9d3ddf572e3744e4cf5e9788b676f423fe69aee8 Mon Sep 17 00:00:00 2001 From: Demi Obenour Date: Tue, 27 Sep 2016 10:54:16 -0400 Subject: Fix M4 quoting of section 3. This fixes M4 quoting of section 3 of the input file, including escape sequences and character constants. Tests were added to verify the behavior in section 3 with respect to quoting. Both escaping of quotes and quoting of potential macro-start characters are tested. Existing tests were also fixed to account for the new -- and now correct -- behavior. Many tests relied on the old behavior of expanding M4 macros in section 3. They needed to be updated for the new behavior. --- tests/reject.l4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/reject.l4') diff --git a/tests/reject.l4 b/tests/reject.l4 index 7eda4a5..9bcde22 100644 --- a/tests/reject.l4 +++ b/tests/reject.l4 @@ -47,7 +47,7 @@ int main ( int argc, char** argv ) M4_YY_DECL_GUTS_VAR(); #ifdef TEST_IS_REENTRANT - yylex_init(&yyscanner); + testlex_init(&yyscanner); #else (void)yyscanner; #endif @@ -67,13 +67,13 @@ int main ( int argc, char** argv ) YY_FATAL_ERROR("could not open input file for reading"); yyin = fp; } - while(yylex(M4_YY_CALL_ONLY_ARG) != 0) + while(testlex(M4_YY_CALL_ONLY_ARG) != 0) ; #ifdef TEST_HAS_TABLES_EXTERNAL - yytables_destroy(M4_YY_CALL_ONLY_ARG); + testtables_destroy(M4_YY_CALL_ONLY_ARG); #endif - yylex_destroy(M4_YY_CALL_ONLY_ARG); + testlex_destroy(M4_YY_CALL_ONLY_ARG); if(argc < 0) /* silence the compiler */ yyscanner = (void*)fp; -- cgit v1.2.3