From 50b2acf3ea107b27893c0798dc26e7c3115ba0ce Mon Sep 17 00:00:00 2001 From: anon Date: Tue, 10 Dec 2024 20:39:01 +0100 Subject: [PATCH] Added 'C_C++/flex/export_help_for_emil.l' --- C_C++/flex/export_help_for_emil.l | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 C_C++/flex/export_help_for_emil.l diff --git a/C_C++/flex/export_help_for_emil.l b/C_C++/flex/export_help_for_emil.l new file mode 100644 index 0000000..d4b0c71 --- /dev/null +++ b/C_C++/flex/export_help_for_emil.l @@ -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 { ; } + +{ +. { /*appending*/ } +\n { ; } +\;|\}|\= { + BEGIN INITIAL; + /* store the buffer somewhere */ + } +} + +{ +. { ; } +\n { BEGIN INITIAL; } +} + +{ +.|\n { ; } +\*\/ { BEGIN INITIAL; } +} +%% + +int yywrap() { + yyin = /*XXX*/ NULL; + return 0; +}