%{ #include "fika.tab.h" %} %% [\n\t ] { /* Ignorera whitespace */ } "start" { return START; } "klart" { return KLART; } "namn" { return NAMN; } "telefon" { return TELEFON; } "kanelbulle" { return KANELBULLE; } "wienerbröd" { return WIENERBROD; } "chokladboll" { return CHOKLADBOLL; } [0-9]+(\.[0-9]+)? { return TAL; } \"[^"\n]*\" { printf("[STRANG: '%s']", yytext); return STRANG; } . { fprintf(stderr, "Ignorerar felaktigt tecken: '%c'\n", *yytext); } %%