diff options
Diffstat (limited to 'tests/test-table-opts/scanner.l')
-rw-r--r-- | tests/test-table-opts/scanner.l | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test-table-opts/scanner.l b/tests/test-table-opts/scanner.l index 18e776b..5b3255f 100644 --- a/tests/test-table-opts/scanner.l +++ b/tests/test-table-opts/scanner.l @@ -53,7 +53,8 @@ m4_ifdef( [[M4_YY_REENTRANT]], yylex_init(&yyscanner); ]]) -#ifdef YY_TABLES_EXTERNAL +m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], +[[ if((fp = fopen(argv[1],"r"))== NULL) yy_fatal_error("could not open tables file for reading" M4_YY_CALL_LAST_ARG); @@ -61,7 +62,7 @@ m4_ifdef( [[M4_YY_REENTRANT]], 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) @@ -71,9 +72,10 @@ m4_ifdef( [[M4_YY_REENTRANT]], while(yylex(M4_YY_CALL_ONLY_ARG) != 0) ; -#ifdef YY_TABLES_EXTERNAL +m4_ifdef( [[YY_TABLES_EXTERNAL]], +[[ yytables_destroy(M4_YY_CALL_ONLY_ARG); -#endif +]]) yylex_destroy(M4_YY_CALL_ONLY_ARG); if(argc < 0) /* silence the compiler */ |