%option nounput noinput DIGIT [0-9] DIGIT13 {DIGIT}{1,3} MILLE _?{DIGIT}{3} SIGNED [-+]? AERE {SIGNED}{DIGIT13}{MILLE}* AERE_BIS [-+]?([0-9]|[0-9][0-9]|[0-9][0-9][0-9])(_?[0-9][0-9][0-9])* %% "("{AERE}")" {printf("OK %s ",yytext) ;} "("[^\)]*")" {printf("BAD %s ",yytext) ;} . ; %% int yywrap(void) { return 1; } int main(int argc, char *argv[]) { while (yylex()!=0) ; return 0; }