fork download
  1. %{
  2. #include <stdio.h>
  3. %}
  4. digits [0-9]{2,}
  5. word [a-z]+
  6. %option noyywrap
  7. %%
  8. \<{digits}\> {printf ("[digits:%s]\n", yytext);}
  9. {word}"."{word}"@info.uaic.ro" {printf ("[email:%s]\n", yytext);}
  10. .|\n ;
  11. %%
  12. int main(int argc, char** argv){
  13. FILE *g;
  14. if(argc>0)
  15. yyin = fopen(argv[1],"r");
  16.  
  17. /*if(!(g = fopen("out.txt","w")))
  18.   fprintf(stderr,"error creating file!");
  19. else
  20.  yyout=g; */
  21.  
  22. yylex();
  23.  
  24. }
  25.  
  26.  
  27.  
Success #stdin #stdout #stderr 0.02s 6856KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/92GQY9/prog:26:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit