Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (15 sloc) 443 Bytes
%{
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "example5.tab.h"
%}
%%
[0-9]+ yylval=atoi(yytext); return NUMBER;
heat return TOKHEAT;
on|off yylval=!strcmp(yytext, "on"); return STATE;
target return TOKTARGET;
temperature return TOKTEMPERATURE;
\n /* ignore linebreak */;
[ \t]+ /* ignore tab */;
%%