help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems


From: John W. Millaway
Subject: Re: problems
Date: Mon, 6 May 2002 09:49:15 -0700 (PDT)

> #include <stdlib.h>
> 
> int main (int c, char **v)
> {
>     FILE *f;
> 
>     if ( !(f=fopen("tentative.input","r")) )
>     {
>       printf("%s\n","impossible ouvrir fichier dans le repertoire");
>       exit(0);
>       }
>   select_input (f); 
> 
>   yyparse ();
> }
> 
> void select_input (FILE *fin)
> {
>         extern FILE *yyin;
>         yyin = fin;
> }

The above code is perfectly good. In a debugger, verify 'yyin == f' inside the
function yylex().

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]