tp-langages-formels/syntaxique/exprlex.l

13 lines
138 B
Plaintext

%option noyywrap
DIG [0-9]
%%
{DIG}+ { yylval.i = atoi(yytext); return INT; }
[+*()] { return *yytext; }
[ \n] { /* ignore */ }
%%