%option noyywrap %option nounput %{ #include #include using namespace std; #include "regex.hpp" #include #include "parser.tab.hpp" %} %% "BASIC" return basic_token; [a-z] { yylval.c = *yytext; return char_token; } [*+?\[\]|\n()] return *yytext; [ \t] { } . { cerr << "Leksicka greska: Neprepoznat karakter '" << *yytext << "'" << endl; exit(EXIT_FAILURE); } %%