% option noyywrap
%{
int len=0;
#include<stdio.h>
%}
// Rules to identify if a character apart from alphabets
// occurs in a string
%%
[a-zA-Z]+ {printf("No character other than alphabets");}
/* here . will match any other character than alphabets
because alphabets are already matched above
* will matches 0 or more characters in front of it.
*/
.* {printf("character other than alphabets present"); }
%%
// code section
int main()
{
yylex();
return 0;
}
JSBvcHRpb24gbm95eXdyYXAKJXsKICBpbnQgbGVuPTA7CiAgI2luY2x1ZGU8c3RkaW8uaD4KJX0KIAovLyBSdWxlcyB0byBpZGVudGlmeSBpZiBhIGNoYXJhY3RlciBhcGFydCBmcm9tIGFscGhhYmV0cwovLyBvY2N1cnMgaW4gYSBzdHJpbmcKIAolJQpbYS16QS1aXSsge3ByaW50ZigiTm8gY2hhcmFjdGVyIG90aGVyIHRoYW4gYWxwaGFiZXRzIik7fQogCi8qIGhlcmUgLiB3aWxsIG1hdGNoIGFueSBvdGhlciBjaGFyYWN0ZXIgdGhhbiBhbHBoYWJldHMKIGJlY2F1c2UgYWxwaGFiZXRzIGFyZSBhbHJlYWR5IG1hdGNoZWQgYWJvdmUKICogd2lsbCBtYXRjaGVzIDAgb3IgbW9yZSBjaGFyYWN0ZXJzIGluIGZyb250IG9mIGl0LgoqLwogCi4qIHtwcmludGYoImNoYXJhY3RlciBvdGhlciB0aGFuIGFscGhhYmV0cyBwcmVzZW50Iik7IH0KJSUKICAKLy8gY29kZSBzZWN0aW9uCiAgIAppbnQgbWFpbigpCiB7IAogIHl5bGV4KCk7CiAgcmV0dXJuIDA7CiB9Cg==