fork download
  1. %{
  2. #include<stdio.h>
  3. %}
  4. %%
  5. [0-9] {printf(“Digit”);}
  6. [a-zA-Z] {printf(“Alphabet”);}
  7. . {printf(“Special Symbols”);}
  8. %%
  9. int main()
  10. {
  11. printf(“Enter symbol:);
  12. yylex();
  13. return 0;
  14. }
  15. int yywrap()
  16. {
  17. return 1;
  18. }
  19.  
Success #stdin #stdout #stderr 0.03s 6836KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/FNEyn5/prog:2:9: Syntax error: Operator expected
ERROR: /home/FNEyn5/prog:18:2: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit