%{ #include "carpets.tab.h" %} %% [\n\t ] { /* Ignore whitespace */ } ";" { return SEMICOLON; } "*" { return TIMES; } "carpet" { return CARPET; } "cleaned" { return CLEANED; } "on" { return ON; } "done" { return DONE; } 2[0-9][0-9][0-9]-[0-1][0-9]-[0-2][0-9] { return DATE; } [0-9]+ { return INTEGER; } [0-9]+\.[0-9]+ { return NONINTEGER; } . { fprintf(stderr, "[scanner: ignoring unknown character: '%c' (%d)]\n", *yytext, *yytext); } %%