fork download
  1. %{#include<stdio.h>
  2. int i;
  3. %}keyword main|int|scanf|printf|if|else
  4. %%
  5.  
  6. {keyword} {
  7. for(i=0;i<yyleng;i++)
  8. printf("%c",toupper(yytext[i]));
  9. }
  10. %%
  11.  
  12. main()
  13. {
  14. yyin=fopen("num.c","r");
  15. yylex();
  16. }
  17.  
  18. int yywrap()
  19. {
  20. return 1;
  21. }
Success #stdin #stdout #stderr 0.03s 6976KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/l9Uqi2/prog:21:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit