Original Post
Hi! I thought it would be nice to use GNU flex to read in my files. I was wrong. I'm expering some strange error. The program just crash. Here is the lex file: And yylex() is called like: My output is: Anyone got any thoughts about this? // Daniel Lännström
%%
[0-9]..."-"[0-9]."-"[0-9]. SetCurrentTo(yytext);
"-"[0-9]+ SetCurrentTo(yytext);
[0-9]+ SetCurrentTo(yytext);
[0-9]+"."[0-9]+ SetCurrentTo(yytext);
"False"|"True" SetCurrentTo(yytext);
, MoveAlong();
'\n' NextEntry();
[ \t]+ ;
. PrintError(yytext);
%%
int yywrap()
{
printf("In yywrap");
return 1;
}
....
yyin = f;
yylex();
printf("Back!\n");a
fclose(f);
ParseFileName(mf, path);
return 0;
}
Comma
yytext = 1
Comma
yytext = True
Comma
yytext = 2005-12-22
Comma
yytext = 90
Comma
yytext = 60006232
Comma
yytext = 10000020
Comma
yytext = 30001669
Comma
yytext = 5
Comma
In yywrap
... and then it crash