Added 'C_C++/flex/export_help_for_emil.l'

This commit is contained in:
anon 2024-12-10 20:39:01 +01:00
parent 530cab90d3
commit 50b2acf3ea

View File

@ -0,0 +1,37 @@
%{
/* include/declaration of a buffer */
%}
%x IN_EXPORT IN_COMMENT IN_MULTILINE_COMMENT
%nodefault
%%
export {
BEGIN IN_EXPORT;
}
\/\/ { BEGIN IN_COMMENT; }
\/\* { BEGIN IN_MULTILINE_COMMENT; }
.|\n { ; }
<IN_EXPORT>{
. { /*appending*/ }
\n { ; }
\;|\}|\= {
BEGIN INITIAL;
/* store the buffer somewhere */
}
}
<IN_COMMENT>{
. { ; }
\n { BEGIN INITIAL; }
}
<IN_MULTILINE_COMMENT>{
.|\n { ; }
\*\/ { BEGIN INITIAL; }
}
%%
int yywrap() {
yyin = /*XXX*/ NULL;
return 0;
}