%{
#include <stdio.h>
#include <string.h>

void print_token(char* token, char* type) {
    printf("%s: %s\n", type, token);
}
%}

%%

Noun    [A-Z][a-zA-Z]*                  { print_token(yytext, "Noun"); }
Verb    (run|jump|eat|play|write)       { print_token(yytext, "Verb"); }
Adverb  (quickly|slowly|gracefully)     { print_token(yytext, "Adverb"); }
Adjective (big|small|beautiful|happy)  { print_token(yytext, "Adjective"); }

[ \t\n]                              { /* Ignore spaces, tabs, and newlines */ }
.                                   { /* Ignore other characters */ }

%%

int main() {
    yylex();  // Start lexical analysis
    return 0;
}
