fork download
  1. %option noyywrap
  2. %{
  3. #include <stdio.h>
  4. %}
  5. %%
  6. ^[ \t]*//.*$ { printf("Comment line (//)\n"); }
  7.  
  8. .*\n { printf("Not a comment line\n"); }
  9. %%
  10. int main(){ yylex(); return 0; }
  11.  
Success #stdin #stdout #stderr 0.04s 6876KB
stdin
//ji
stdout
Standard output is empty
stderr
ERROR: /home/VgOWsn/prog:10:32: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? [Illegal port specification]
   Exception: (3) program ? EOF: exit