%{
#include <stdio.h>
%}
%%
\+|\/|\* { printf("operateur\n"); } // Match '+', '/', or '*' and print "operateur"
F+ { printf("Une suite de F\n"); } // Match one or more 'F' and print the message
(ab){2,} { printf("Deux ab ou plus\n"); } // Match "ab" repeated two or more times
[A-Za-z0-9]{3} { printf("Mot de longueur 3\n"); } // Match exactly 3 characters (letters or digits)
. { /* Ignore other characters */ } // Ignore any other input
%%
int main() {
yylex(); // Start scanning input
return 0;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQpcK3xcL3xcKiAgICAgICAgICAgICB7IHByaW50Zigib3BlcmF0ZXVyXG4iKTsgfSAgLy8gTWF0Y2ggJysnLCAnLycsIG9yICcqJyBhbmQgcHJpbnQgIm9wZXJhdGV1ciIKRisgICAgICAgICAgICAgICAgICAgeyBwcmludGYoIlVuZSBzdWl0ZSBkZSBGXG4iKTsgfSAgLy8gTWF0Y2ggb25lIG9yIG1vcmUgJ0YnIGFuZCBwcmludCB0aGUgbWVzc2FnZQooYWIpezIsfSAgICAgICAgICAgICB7IHByaW50ZigiRGV1eCBhYiBvdSBwbHVzXG4iKTsgfSAgLy8gTWF0Y2ggImFiIiByZXBlYXRlZCB0d28gb3IgbW9yZSB0aW1lcwpbQS1aYS16MC05XXszfSAgICAgICB7IHByaW50ZigiTW90IGRlIGxvbmd1ZXVyIDNcbiIpOyB9ICAvLyBNYXRjaCBleGFjdGx5IDMgY2hhcmFjdGVycyAobGV0dGVycyBvciBkaWdpdHMpCi4gICAgICAgICAgICAgICAgICAgIHsgLyogSWdub3JlIG90aGVyIGNoYXJhY3RlcnMgKi8gfSAgLy8gSWdub3JlIGFueSBvdGhlciBpbnB1dAolJQoKaW50IG1haW4oKSB7CiAgICB5eWxleCgpOyAgLy8gU3RhcnQgc2Nhbm5pbmcgaW5wdXQKICAgIHJldHVybiAwOwp9Cg==