%{
#include <stdio.h>

// Define token types
#define MOV 1
#define ADD 2
#define NUM 3
#define IDENTIFIER 4
%}

%%

"mov"           { return MOV; }
"add"           { return ADD; }
[0-9]+          { return NUM; }  // Removed yylval since we are not using Yacc/Bison
[a-zA-Z][a-zA-Z0-9]* { return IDENTIFIER; }
[\t\n ]+        { /* Ignore whitespace */ }
.               { printf("Unknown character: %s\n", yytext); }

%%

int main() {
    int token;
    while ((token = yylex())) {
        printf("Token: %d\n", token);
    }
    return 0;
}
