Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Mar 2000 20:40:49 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Jonathon McKitrick <jcm@dogma.freebsd-uk.eu.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: parsing in C++
Message-ID:  <20000304204049.I270@hades.hell.gr>
In-Reply-To: <Pine.BSF.4.21.0003040237120.1782-100000@dogma.freebsd-uk.eu.org>; from jcm@dogma.freebsd-uk.eu.org on Sat, Mar 04, 2000 at 02:39:05AM %2B0000
References:  <Pine.BSF.4.21.0003040237120.1782-100000@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 04, 2000 at 02:39:05AM +0000, Jonathon McKitrick wrote:
>
> For the recursive-descent parser i am writing, i need to keep track
> of line numbers.  I didn't find an infile.eol() function, but i don't
> want to assume it can't be done using the C++ extraction operator.

I'm sorry, but I can't help with C++.

> Does anyone know if this is possible?  Or do i need to go back to
> fscanf()?

No, no, no.  By any means, don't use ANSI-C and <iostream.h> I/O
routines in the same program.  Unless you have disabled buffering in
both of them, pretty weird stuff might come forth when two buffers hold
parts of the same stream, and they are flushed by their respective
holders in (seemingly) random order.

-- 
Giorgos Keramidas, < keramida @ ceid . upatras . gr >
For my public PGP key: finger keramida@diogenis.ceid.upatras.gr
PGP fingerprint, phone and address in the headers of this message.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000304204049.I270>