20 lines
307 B
Text
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;
|
|
}
|