fork download
  1. %{
  2. #include <stdio.h>
  3. %}
  4.  
  5. %%
  6.  
  7. [01]*0 { printf("Accepted\n"); }
  8.  
  9. .* { printf("Rejected\n"); }
  10.  
  11. %%
  12.  
  13. int main()
  14. {
  15. printf("Enter string for language consisting of binary strings ending with 0:\n");
  16. yylex();
  17. return 0;
  18. }
  19.  
  20. int yywrap()
  21. {
  22. return 1;
  23. }
  24.  
Success #stdin #stdout #stderr 0.02s 6892KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/LBI8sG/prog:23:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit