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