[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ftell with yyin problem
From: |
Hans Aberg |
Subject: |
Re: ftell with yyin problem |
Date: |
Tue, 9 Apr 2002 23:49:06 +0200 |
Reply-to: address@hidden
At 16:05 -0400 2002/04/09, Vitaliy Ziskin wrote:
> I'm trying to use ftell(yyin) in my Bison parser. However, it seems
>that ftell always
>
>returns the end of file position, no matter where it was called. Am I
>doing something
>
>wrong here? Can someone let me know?
The Bison generated parser does not read the stream, but only the tokens
handed over to it by the lexer. Thus, it cannot affect the stream directly.
Isn't so that you are using Flex: Then the Flex generated lexer has a
buffer of its own; ftell will tell the stream position, not the Flex lexer
buffer position.
This has been discussed in the:
Help-flex mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-flex
where you can get more info.
Hans Aberg