%{
#include "string.h"
#include "y.tab.h"
%}
%%
"program" return(Program);
"poczatek" return(Poczatek);
"koniec" return(Koniec);
"tablica" return(Tablica);
"jesli" return(Jesli);
"to" return(To);
"przeciwnie" return(Przeciwnie);
"ilsej" return(Ilsej);
"dopoki" return(Dopoki);
"wykonuj" return(Wykonuj);
"ikopod" return(Ikopod);
"czytaj" return(Czytaj);
"drukuj" return(Drukuj);
"calkowite" return(Calkowite);
"rzeczywiste" return(Rzeczywiste);
"boolowskie" return(Boolowskie);
"prawda" return(Prawda);
"lsz" return(Falsz);
"i" return(I);
"lub" return(Lub);
"nie" return(Nie);
[a-zA-Z][a-zA-Z0-9]* {yyLval.t=strdup(yytext); return(Id);}
0|[1-9][0-9]*.(0|[0-9]*[1-9])(e|E)("+"|"-")?(0|[1-9][0-9]*) {yylval.t=strdup(yytext); return(Rzeczywista);
0|[1-9][0-9]* {yylval.t=strdup(yytext); return(Calkowita);}
[ nt] ;
":=" return(Przypisz);
"><" return(Rozne);
"<=" return(MniejszeRowne);
">=" return(WiekszeRowne);
[=+-*:;.()][] return(yytext[0]);
. {printf("Blad leksykalny %c", yytext[0]); yyterminate();}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}