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

This commit is contained in:
anon 2024-12-10 20:39:01 +01:00
parent 745d43f178
commit 5e3fe98f26

15
C_C++/flex/scan_string.l Normal file
View File

@ -0,0 +1,15 @@
/* @BAKE
flex -o scan_string.yy.c $@
gcc -o scan_string.out scan_string.yy.c
./scan_string.out
@STOP
*/
%option noyywrap
%%
%%
signed main() {
const char * input = "This is my input";
YY_BUFFER_STATE const b = yy_scan_string(input);
yylex();
yy_delete_buffer(b);
}