fork download
  1. %s A B C
  2.  
  3. %%
  4. <INITIAL>1 BEGIN INITIAL;
  5. <INITIAL>0 BEGIN A;
  6. <INITIAL>\n BEGIN INITIAL; printf("String is not accepted.");
  7.  
  8. <A>1 BEGIN INITIAL;
  9. <A>0 BEGIN B;
  10. <A>\n BEGIN INITIAL; printf("String is not accepted.");
  11.  
  12. <B>0 BEGIN C;
  13. <B>1 BEGIN INITIAL;
  14. <B>\n BEGIN INITIAL; printf("String is not accepted.");
  15.  
  16. <C>0 BEGIN C;
  17. <C>1 BEGIN C;
  18. <C>\n BEGIN INITIAL; printf("String is accepted.");
  19. %%
  20.  
  21. main() {
  22. printf("Enter a string: ");
  23. yylex();
  24. }
  25.  
  26.  
Success #stdin #stdout #stderr 0.02s 6888KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/DKvhGJ/prog:25:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit