fork download
  1. %{
  2. #include <stdio.h>
  3. %}
  4.  
  5. /* Define a simple yywrap if needed (some Flex versions require it) */
  6. int yywrap(void) {
  7. return 1;
  8. }
  9.  
  10. %%
  11. [0-9]+ { printf("%s\n", yytext); } /* Print any sequence of one or more digits */
  12. .|\n { /* Ignore any other characters */ }
  13. %%
  14.  
  15. int main(int argc, char **argv) {
  16. yylex();
  17. return 0;
  18. }
  19.  
Success #stdin #stdout #stderr 0.02s 6924KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/YkzB8z/prog:18:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit