regarding a lex sample program...
Hi,
I have the following program,
%%
[^ab]+ { printf("string is %s\n",yytext); }
. { ECHO ; printf("\n");}
%%
int main()
{
yylex();
return(0);
}
when i run it, and give the following input
111a222a333a444
i get the following output,
string is 111
a
string is 222
a
string is 333
a
and thats it... i don't understand why the last string of 444 is not prited, can anyone help me on this...
Thanks And Regards,
Vaairavan.S
|