fork download
  1. %{
  2. #include <stdio.h>
  3. int lower = 0, upper = 0, mixed = 0;
  4. %}
  5.  
  6. %%
  7. [a-z]+ { lower++; }
  8. [A-Z]+ { upper++; }
  9. .+ {mixed++;}
  10. %%
  11.  
  12. int main() {
  13. yylex();
  14. printf("Lower = %d, Upper = %d, Mixed = %d\n", lower, upper, mixed);
  15. return 0;
  16. }
  17.  
  18. int yywrap() {
  19. return 1;
  20. }
  21.  
Success #stdin #stdout #stderr 0.03s 6948KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/rozuDI/prog:20:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit