(flex.info)unnamed-faq-101


Next: What is the difference between YYLEX_PARAM and YY_DECL? Prev: unnamed-faq-100 Up: FAQ
Enter node , (file) or (file)node

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


automatically generated by info2www version 1.2.2.9