%{
#include <stdio.h>
%}
%%
a+ { printf("Matched a sequence of 'a'\n"); }
b+ { printf("Matched a sequence of 'b'\n"); }
(a+)(b+) { printf("Matched a sequence of 'a' followed by 'b'\n"); }
. { printf("Invalid character: %c\n", yytext[0]); }
%%
int main(int argc, char **argv) {
yylex();
return 0;
}
int yywrap() {
return 1;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQphKyAgICAgeyBwcmludGYoIk1hdGNoZWQgYSBzZXF1ZW5jZSBvZiAnYSdcbiIpOyB9CmIrICAgICB7IHByaW50ZigiTWF0Y2hlZCBhIHNlcXVlbmNlIG9mICdiJ1xuIik7IH0KKGErKShiKykgeyBwcmludGYoIk1hdGNoZWQgYSBzZXF1ZW5jZSBvZiAnYScgZm9sbG93ZWQgYnkgJ2InXG4iKTsgfQouICAgICAgeyBwcmludGYoIkludmFsaWQgY2hhcmFjdGVyOiAlY1xuIiwgeXl0ZXh0WzBdKTsgfQolJQoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKiphcmd2KSB7CiAgICB5eWxleCgpOwogICAgcmV0dXJuIDA7Cn0KCmludCB5eXdyYXAoKSB7CiAgICByZXR1cm4gMTsKfQo=