fork download
  1. %{
  2. #include <stdio.h>
  3. %}
  4.  
  5. %%
  6. a{1}b{1} printf("Matched: a b\n");
  7. a{2}b{2} printf("Matched: aa bb\n");
  8. a{3}b{3} printf("Matched: aaa bbb\n");
  9. a{4}b{4} printf("Matched: aaaa bbbb\n");
  10. a{5}b{5} printf("Matched: aaaaa bbbbb\n");
  11. .|\n ; // ignore others
  12. %%
  13.  
  14. int main() {
  15. yylex();
  16. return 0;
  17. }
  18.  
Success #stdin #stdout #stderr 0.03s 6908KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/GNuecO/prog:17:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit