flex: unnamed-faq-101

 
 unnamed-faq-101
 ===============
 
      To: slg3@lehigh.edu (SAMUEL L. GULDEN)
      Subject: Re: Flex problem
      In-reply-to: Your message of Thu, 02 Mar 2000 12:29:04 PST.
      Date: Thu, 02 Mar 2000 23:00:46 PST
      From: Vern Paxson <vern>
      
      If this is exactly your program:
      
      > digit [0-9]
      > digits {digit}+
      > whitespace [ \t\n]+
      >
      > %%
      > "[" { printf("open_brac\n");}
      > "]" { printf("close_brac\n");}
      > "+" { printf("addop\n");}
      > "*" { printf("multop\n");}
      > {digits} { printf("NUMBER = %s\n", yytext);}
      > whitespace ;
      
      then the problem is that the last rule needs to be "{whitespace}" !
      
      		Vern