{
#include <stdio.h>
#include <stdlib.h>
int nb = 0;
int mot = 0;
int pen = 0;
%}
%option noyywrap
chiffre [0-9]
mot [a-zA-Z]+
punctuation [,:!;]
%%
{mot} { mot++; }
{punctuation}+ { pen++; }
{chiffre}+(""{chiffre}+)*(","{chiffre}+)? { nb++; }
%%
int main()
{
yylex();
printf("Il y a %d mots\n", mot);
printf("Il y a %d nombres\n", nb);
printf("Il y a %d ponctuations\n", pen);
return 0;
}
ewogICAgI2luY2x1ZGUgPHN0ZGlvLmg+CiAgICAjaW5jbHVkZSA8c3RkbGliLmg+CiAgICBpbnQgbmIgPSAwOwogICAgaW50IG1vdCA9IDA7CiAgICBpbnQgcGVuID0gMDsKJX0gCgolb3B0aW9uIG5veXl3cmFwIAoKY2hpZmZyZSBbMC05XQptb3QgICAgW2EtekEtWl0rCnB1bmN0dWF0aW9uIFssOiE7XQoKJSUgCnttb3R9IHsgbW90Kys7IH0Ke3B1bmN0dWF0aW9ufSsgeyBwZW4rKzsgfQp7Y2hpZmZyZX0rKCIie2NoaWZmcmV9KykqKCIsIntjaGlmZnJlfSspPyB7IG5iKys7IH0KCiUlIAoKaW50IG1haW4oKSAKeyAKICAgIHl5bGV4KCk7IAogICAgcHJpbnRmKCJJbCB5IGEgJWQgbW90c1xuIiwgbW90KTsKICAgIHByaW50ZigiSWwgeSBhICVkIG5vbWJyZXNcbiIsIG5iKTsKICAgIHByaW50ZigiSWwgeSBhICVkIHBvbmN0dWF0aW9uc1xuIiwgcGVuKTsKICAgIHJldHVybiAwOwp9IA==