This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

flex problem


Dear All,

I recently installed the latest cygwin version
on WinNT 4.0; somehow all my Flex programs
started generating very strange output and
I wonder if could please help.

consider, e.g., this pretty straighforward Flex program:


/*  to compile
 *  bash-2.04$  flex l.lex && gcc -o l lex.yy.c
 *
 */

DIGIT [0-9]
ID    [a-zA-Z[:punct:]]

%option noyywrap

%%
[ \t\n]+
({DIGIT})+ printf ("found digit\n");
({ID})+    printf ("found id\n");
.        printf (":%s: length :%d: not found\n", yytext, yyleng);
%%

int main (int argc, char **argv)
{
  yyin = stdin;
  yylex ();
  return 0;
}

=====================================
then i get this pretty unexpected result:


bash-2.04$ ./l
hello
:h: length :1: not found
:e: length :1: not found
:l: length :1: not found
:l: length :1: not found
:o: length :1: not found




what could possibly go wrong here?

Thank you so much for any insights beforehand.

Best regards,
  Dmitry


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]