fork download
  1. %{
  2. #include<stdio.h>
  3. %}
  4.  
  5. %%
  6. if | else | while | for {printf("%S is a keyword",yytext);}
  7. %%
  8.  
  9. int main()
  10. {
  11. printf("\n Enter the string: ");
  12. yylex();
  13.  
  14. }
  15. int yywrap()
  16. {
  17. return 1;
  18. }
Success #stdin #stdout #stderr 0.02s 6864KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/aPPwRR/prog:18:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit