diff options
Diffstat (limited to 'tests/test-reject/scanner.l')
-rw-r--r-- | tests/test-reject/scanner.l | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/test-reject/scanner.l b/tests/test-reject/scanner.l index a90a1fa..25dab60 100644 --- a/tests/test-reject/scanner.l +++ b/tests/test-reject/scanner.l @@ -46,13 +46,11 @@ int main ( int argc, char** argv ) void *yyscanner=0; M4_YY_DECL_GUTS_VAR(); -m4_ifdef( [[M4_YY_REENTRANT]], -[[ +#ifdef TEST_IS_REENTRANT yylex_init(&yyscanner); -]]) +#endif -m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], -[[ +#ifdef TEST_HAS_TABLES_EXTERNAL if((fp = fopen(argv[1],"r"))== NULL) yy_fatal_error("could not open tables file for reading" M4_YY_CALL_LAST_ARG); @@ -60,7 +58,7 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], yy_fatal_error("yytables_fload returned < 0" M4_YY_CALL_LAST_ARG); if(M4_YY_TABLES_VERIFY) exit(0); -]]) +#endif if(argc > 2){ if((fp = fopen(argv[2],"r"))== NULL) @@ -70,10 +68,9 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], while(yylex(M4_YY_CALL_ONLY_ARG) != 0) ; -m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], -[[ +#ifdef TEST_HAS_TABLES_EXTERNAL yytables_destroy(M4_YY_CALL_ONLY_ARG); -]]) +#endif yylex_destroy(M4_YY_CALL_ONLY_ARG); if(argc < 0) /* silence the compiler */ |