fork download
  1. %s A B C F
  2. %%
  3. <INITIAL>\n printf(" accepted\n");BEGIN INITIAL;
  4. <INITIAL>a BEGIN A;
  5. <INITIAL>b BEGIN B;
  6. <A>a BEGIN INITIAL;
  7. <A>b BEGIN C;
  8. <A>\n BEGIN INITIAL; printf(" not accepted\n");
  9. <B>a BEGIN C;
  10. <B>b BEGIN INITIAL;
  11. <B>\n BEGIN INITIAL; printf(" not accepted\n");
  12. <C>a BEGIN B;
  13. <C>b BEGIN A;
  14. <C>\n BEGIN INITIAL; printf(" not accepted\n");
  15. <A>[^ab\n] BEGIN F;
  16. <B>[^ab\n] BEGIN F;
  17. <C>[^ab\n] BEGIN F;
  18. <INITIAL>[^ab\n] BEGIN F;
  19. <F>[^\n] BEGIN F;
  20. <F>[\n] BEGIN INITIAL;printf("Invalid Input\n");
  21. . ;
  22. %%
  23.  
  24. main()
  25. { printf(“Enter the String of a and b only:\n”);
  26. yylex();
  27. }
  28. /*
  29.  
Success #stdin #stdout #stderr 0.03s 6972KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/BskwQf/prog:3:1: Syntax error: Operator expected
ERROR: /home/BskwQf/prog:21:3: Syntax error: End of file in /* ... */ comment
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit