fork download
  1. %{
  2. int lines=0, tabs=0, spaces=0, chars=0;
  3. %}
  4. %%
  5. [\n] lines++;
  6. [\t] tabs++, spaces++;
  7. [" "] spaces++;
  8. [a-zA-Z0-9] chars++;
  9. %%
  10. yywrap() {}
  11. int main() {
  12. yylex();
  13. printf("Lines: %d, tabs: %d, Spaces: %d, Characters: %d", lines, tabs, spaces, chars);
  14. return 0;
  15. }
  16. %%
Success #stdin #stdout #stderr 0.03s 6812KB
stdin
Heya
I am Pawan
I am final year student
stdout
Standard output is empty
stderr
ERROR: /home/E3fWfS/prog:16:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? ERROR: Unknown option (h for help)
   Exception: (3) program ? ERROR: Unknown option (h for help)
   Exception: (3) program ? EOF: exit