fork download
  1. %{
  2. #include<stdio.h>
  3. int lc = 0 , sc = 0 , tc= 0 , oc = 0;
  4. %}
  5. %%
  6. \n {lc++;}
  7. %%
  8.  
  9. int main(){
  10. printf("enter input:\n");
  11. yylex();
  12. printf("lines : %d",lc);
  13. return 0;
  14.  
  15. }
Success #stdin #stdout #stderr 0.04s 6912KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/5DYxGq/prog:15:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit