libdice/lib/dice_lexer.l

20 lines
200 B
Plaintext

%option bison-bridge
%option reentrant
%{
#include "dice.h"
#include "dice_parse.h"
%}
%%
[0-9]+ {
yylval->integer = atoi(yytext);
return TOK_INTEGER;
}
[d] {
return TOK_DICESEP;
}
%%