fork download
  1. %{
  2. #include <stdio.h>
  3. %}
  4.  
  5. %%
  6. [a-zA-Z_][a-zA-Z0-9_]* {
  7. printf("Valid identifier: %s\n", yytext);
  8. }
  9. . ;
  10.  
  11. %%
  12.  
  13. int main() {
  14. yylex();
  15. return 0;
  16. }
  17.  
Success #stdin #stdout #stderr 0.02s 6892KB
stdin
hello how are you
stdout
Standard output is empty
stderr
ERROR: /home/c6QO3i/prog:2:1: Syntax error: Operator expected
ERROR: /home/c6QO3i/prog:16:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? Options:
+:                  spy        -:              no spy
/c|e|r|f|u|a goal:  find       .:              repeat find
a:                  abort      A:              alternatives
b:                  break      c (ret, space): creep
[depth] d:          depth      e:              exit
f:                  fail       [ndepth] g:     goals (backtrace)
h (?):              help       i:              ignore
l:                  leap       L:              listing
n:                  no debug   p:              print
r:                  retry      s:              skip
u:                  up         w:              write
m:                  exception details
C:                  toggle show context
   Exception: (3) program ? EOF: exit