%{
#include <stdio.h>
%}
%%
int
|float|char
|double
|short
|long
|unsigned
|signed
|void
|auto
|const
|extern
|static
|register
|volatile
{ printf
("KEYWORD
: %s\n", yytext); }[a-zA-Z][a-zA-Z0-9]* { printf("IDENTIFIER: %s\n", yytext); }
[ \t]+ { printf("WHITESPACE: \"%s\"\n", yytext); }
\n { printf("NEWLINE\n"); }
. { printf("CHARACTER: %c\n", yytext[0]); }
%%
int yywrap() {
return 1;
}
int main() {
yylex();
return 0;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQoKaW50fGZsb2F0fGNoYXJ8ZG91YmxlfHNob3J0fGxvbmd8dW5zaWduZWR8c2lnbmVkfHZvaWR8YXV0b3xjb25zdHxleHRlcm58c3RhdGljfHJlZ2lzdGVyfHZvbGF0aWxlIHsgcHJpbnRmKCJLRVlXT1JEOiAlc1xuIiwgeXl0ZXh0KTsgfQpbYS16QS1aXVthLXpBLVowLTldKiB7IHByaW50ZigiSURFTlRJRklFUjogJXNcbiIsIHl5dGV4dCk7IH0KWyBcdF0rICAgICAgICAgICAgICAgeyBwcmludGYoIldISVRFU1BBQ0U6IFwiJXNcIlxuIiwgeXl0ZXh0KTsgfSAKXG4gICAgICAgICAgICAgICAgICAgeyBwcmludGYoIk5FV0xJTkVcbiIpOyB9Ci4gICAgICAgICAgICAgICAgICAgIHsgcHJpbnRmKCJDSEFSQUNURVI6ICVjXG4iLCB5eXRleHRbMF0pOyB9CgolJQppbnQgeXl3cmFwKCkgewogICAgcmV0dXJuIDE7Cn0KaW50IG1haW4oKSB7CiAgICB5eWxleCgpOwogICAgcmV0dXJuIDA7Cn0KCg==