fork download
  1. %{#include<stdio.h>
  2.  
  3. %}
  4.  
  5. %%
  6.  
  7. [0-9]+ {printf(“\n Integer number);}
  8.  
  9. [0-9]+.[0-9]+ {printf(“\n Decimal number);}
  10.  
  11. [a-z]+ {printf(“\n All small letters alphabet”);}
  12.  
  13. [A-Z]+ {printf(“\n All capital letters alphabet”);}
  14.  
  15. [a-zA-Z]+ {printf(“\n Combination of small and capital letters”);}
  16.  
  17. [a-zA-Z0-9]+ {printf(“\n Alphanumeric”);}
  18.  
  19. . {printf(“\n No matching”);}
  20.  
  21. %%
  22.  
  23. Void main()
  24.  
  25. { printf(“Enter Input:);
  26.  
  27. yylex();
  28.  
  29. }
  30.  
  31. Int yywrap()
  32.  
  33. { return 1;
  34.  
  35. }
Success #stdin #stdout #stderr 0.04s 6948KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/mFHPpw/prog:7:19: Syntax error: Operator expected
ERROR: /home/mFHPpw/prog:35:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit