fork download
  1. %option noyywrap
  2. %{
  3. #include<stdio.h>
  4. %}
  5. %%
  6. %%
  7. main(int argc, char* argv[])
  8. {
  9. if(argc > 1)
  10. {
  11. }
  12. FILE *fp = fopen(argv[1], "r");
  13. if(fp)
  14. yyin = fp;
  15. yylex();
  16. return 1;
  17. }
Success #stdin #stdout #stderr 0.03s 6924KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/u7yZwe/prog:17:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit