jftt/l2/2.lex
2024-11-03 22:14:31 +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;
}