%{ #include "itanium_gram.h" static unsigned int itanium_txt_length = 0; /* Borne la longueur d'une chaîne à lire. */ void set_itanium_text_length(unsigned int); %} %option noyywrap %option yylineno %x identifier %% _Z { return ITANIUM_SIGNATURE; } E { return EE; } N { return NN; } I { return II; } C1 { return C1; } C2 { return C2; } C3 { return C3; } D0 { return C1; } D1 { return D2; } D2 { return D3; } v { return V; } w { return W; } b { return B; } c { return C; } a { return A; } h { return H; } s { return S; } t { return T; } i { return I; } j { return J; } l { return L; } m { return M; } x { return X; } y { return Y; } n { return N; } o { return O; } f { return F; } d { return D; } e { return E; } g { return G; } z { return Z; } Dd { return DD; } De { return DE; } Df { return DF; } Dh { return DH; } Di { return DI; } Ds { return DS; } u { return U; } P { return TP; } R { return TR; } O { return TO; } C { return TC; } G { return TG; } r { return QR; } V { return QV; } K { return QK; } St { return ST; } Sa { return SA; } Sb { return SB; } Ss { return SS; } Si { return SI; } So { return SO; } Sd { return SD; } [0-9]+ { yylval.val = atoi(yytext); return NUMBER; } . { if (--itanium_txt_length == 0) BEGIN(INITIAL); yylval.car = *yytext; return CHAR; } <*>. { printf("error : '%s'\n", yytext); } %% /****************************************************************************** * * * Paramètres : length = taille de chaîne à lire. * * * * Description : Borne la longueur d'une chaîne à lire. * * * * Retour : - * * * * Remarques : - * * * ******************************************************************************/ void set_itanium_text_length(unsigned int length) { itanium_txt_length = length; BEGIN(identifier); }