jftt/l2/2.l
2024-11-03 22:05:19 +01:00

20 lines
307 B
Text

%x COMMENT
%%
<INITIAL>"--" { BEGIN(COMMENT); }
<COMMENT>"\n" { ECHO; BEGIN(INITIAL); }
<INITIAL>. { ECHO; }
<COMMENT>. { }
%%
// https://westes.github.io/flex/manual/Start-Conditions.html
#include <stdlib.h>
int main(void) {
yylex();
return EXIT_SUCCESS;
}