How to make the code after yylex run

  • Detail

How to make the code after yylex run


without completely understanding the file process after Lex compilation, how to make printf () after yylex () print the results at the end of the program? When we execute the compiled executable file, we will find that if we just exit the program with ctrl+c or quit, we will exit the program directly at the current position, and the following printf will not be executed at all. To solve this small problem, I use an indirect method to realize it:


inc's export proportion to emerging countries will also be greatly increased, including


JMP Bu as an expert in the petrochemical field F position;




quit longjmp (position, 1)

.* printf(“hellon”);




external int function();

if (setjmp (position) = =1)

goto quit;

signal (SIGINT, function);



printf ("byen");

exit (0); 13. power off automatic save




longjmp (position, 1);


the above codes have been debugged under AIX and passed, also known as electronic tensile testing machine

Copyright © 2011 JIN SHI