%option noyywrap
%option nounput

%{
#include <iostream>
#include <cstdlib>
using namespace std;
#include "Polinom.hpp"
#include "parser.tab.hpp"
%}

%%
(-)?[0-9]+(\.[0-9]+)? { yylval.vrednost = atof(yytext);
			//cout<<" broj";
			return NUM;}
[a-z][0-9] {		yylval.ime_prom = new string(yytext);
			//cout<<" id ";
			return ID;
	   }
[+\n*()<>\'\[\]|$:=!,-] {//cout << *yytext;
			return *yytext;
                       }
[ \t] {}
. {cerr << "Leksicka greska "<<endl;
   exit(EXIT_FAILURE);
  }


%%


