fork download
  1. /*Definition Section*/
  2. %{
  3. #include<stdio.h>
  4. %}
  5.  
  6.  
  7. /*Rule Section*/
  8.  
  9. %%
  10. /*Regular expression for single line comment*/
  11. \/\/(.*) {};
  12. /*Regular expression for multi line comment*/
  13. \/\*(.*\n)*.*\*\/ {};
  14. %%
  15.  
  16. /*call the yywrap function*/
  17. int yywrap()
  18. {
  19. return 1;
  20. }
  21.  
  22.  
  23.  
  24. /*Auxiliary function*/
  25. /*Driver function*/
  26.  
  27. int main()
  28. {
  29. yyin=fopen("input6.c","r");
  30. yyout=fopen("out.c","w");
  31. /*call the yylex function.*/
  32. yylex();
  33. return 0;
  34. }
  35.  
Success #stdin #stdout #stderr 0.02s 6820KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/OILSQj/prog:34:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit