[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-flex] unexpected end of file
From: |
soledady |
Subject: |
[help-flex] unexpected end of file |
Date: |
Mon, 04 Jul 2005 13:01:40 +0200 |
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);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [help-flex] unexpected end of file,
soledady <=