delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/07/18:31:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20010107233102.29006.qmail@nwcst285.netaddress.usa.net>
Date: 7 Jan 2001 18:31:02 EST
From: Dmitry V Golovashkin <golova AT usa DOT net>
To: cygwin AT cygwin DOT com
Subject: flex problem
X-Mailer: USANET web-mailer (34FM.0700.15.02)
Mime-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id SAA12643

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019