help-bison
[Top][All Lists]
Advanced

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

Re: calling yyparse repeatedly


From: Prabhu M.K
Subject: Re: calling yyparse repeatedly
Date: Thu, 24 Jan 2002 19:57:22 +0530


> You should have described your problem completely the first time!
>
> Try to rewind the FILE * first, then yyrestart.  If that's not enough,
> fclose it, fopen it again: maybe Flex is trying to be too smart (which
> is often not a good thing from programming tools).
>
>        The rewind function sets the file position  indicator  for
>        the  stream  pointed  to by stream to the beginning of the
>        file.  It is equivalent to:
>
>               (void)fseek(stream, 0L, SEEK_SET)
>
>        except that the error indicator for  the  stream  is  also
>        cleared (see clearerr(3)).

i finished exercies(rewinding yyin, closing and opeing the yyin, and
calling yyrestart before the second call) what u said, At the first call
the output is looks like below one.


--(end of buffer or a NUL) ----->(First call of yyparse)
--accepting rule at line 60 ("<?EML-VERSION 1.0?>")
--accepting rule at line 69 ("
<?ETT")
--accepting rule at line 59 (" ")

goes on......



--(end of buffer or a NUL)
yywrap called
--EOF (start condition 1)
Test-1: parser passed    ---> (First call is finished)
--(end of buffer or a NUL)  ---->(Second call of yyparse)
--accepting rule at line 75 ("<")
Got an Error
!ERROR(<)
--accepting rule at line 74 ("?EML-VERSION 1.0?>")
Syntax error: parse error
Test-2: parser failed
Press any key to continue

Where am goin wrong

Thanks very very very much for the kind help...

Prabhu M.K


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




reply via email to

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