fork download
  1. %{
  2. #include <stdio.h>
  3. int count = 0;
  4. %}
  5.  
  6. %%
  7. .|\n { count++; }
  8. %%
  9.  
  10. int yywrap() { return 1; }
  11.  
  12. int main() {
  13. yylex();
  14. printf("Total number of characters: %d\n", count);
  15. return 0;
  16. }
  17.  
Success #stdin #stdout #stderr 0.02s 6900KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/QRk29W/prog:16:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit