lex

%{
#include <stdio.h>
%}

%option noyywrap

%%

[ \t\n]+   ;  // ignore white space
int|float|char      { printf("Keyword: %s\n", yytext); }
[0-9]+              { printf("Constant: %s\n", yytext); }
[a-zA-Z_][a-zA-Z0-9_]* { printf("Identifier: %s\n", yytext); }
[+\-*/=<>]          { printf("Operator: %s\n", yytext); }
[,:;]          { printf("Special symbol: %s\n", yytext); }
.                   { printf("Invalid character: %s\n", yytext); }


%%

int main() {
    yylex();
    return 0;
}