%{
#include <stdio.h>
%}
%%
// Define patterns for tokens
[0-9]+ { printf
("
NUMBER: %s\n", yytext); } "+" { printf("PLUS\n"); }
"-" { printf("MINUS\n"); }
[ \t\n] { /* Ignore whitespace */ }
. { printf("UNKNOWN: %s\n", yytext); }
%%
// Main function
int main(void) {
yylex
(); // Call the lexer
return 0;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQovLyBEZWZpbmUgcGF0dGVybnMgZm9yIHRva2VucwpbMC05XSsgICB7IHByaW50ZigiTlVNQkVSOiAlc1xuIiwgeXl0ZXh0KTsgfQoiKyIgICAgIHsgcHJpbnRmKCJQTFVTXG4iKTsgfQoiLSIgICAgIHsgcHJpbnRmKCJNSU5VU1xuIik7IH0KWyBcdFxuXSAgeyAvKiBJZ25vcmUgd2hpdGVzcGFjZSAqLyB9Ci4gICAgICAgIHsgcHJpbnRmKCJVTktOT1dOOiAlc1xuIiwgeXl0ZXh0KTsgfQoKJSUKCi8vIE1haW4gZnVuY3Rpb24KaW50IG1haW4odm9pZCkgewogICAgeXlsZXgoKTsgIC8vIENhbGwgdGhlIGxleGVyCiAgICByZXR1cm4gMDsKfQo=