hello,

i have a problem when i launch this command 
flex mot.lex

it's tell me in french (cause i am) 
mot.lex line 29 unexpected end of file

the 29th line is the last one of the file

the file look like that:
(a very simple thing)
%{
    /*déclarations C*/
    #include <stdio.h>
    int total = 0;
    int score = 0;

    %}
    /*Déclarations lex*/
    LETTRE   [a-zA-Z];
    CHIFFRE  [0-9];
    MOT      {LETTRE}+;
    NOMBRE   {CHIFFRE}+;

    %%
    /*Règles et actions sémantiques.*/

    {NOMBRE}  total+= atoi( yytext );
    {MOT}     if (yyleng > score){
                score = yyleng;
                printf("\n%s", yytext );
               }
             printf("\nNi mot, ni nombre :%s", yytext);
    %%

    int main( void ) {
        yylex() ;
        printf("\nSomme des nombres %d\nbye...\n", total);
       }





_______________________________________________
Help-flex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-flex

Reply via email to