[antlr-interest] small CharInputBuffer class

Braden McDaniel braden at endoframe.com
Tue Oct 2 12:05:36 PDT 2001

On Tue, 2001-10-02 at 13:48, Ruslan Zasukhin wrote:
> Hi Ric,
> I have look on CharBuffer class...
> Yes it want to get istream as parameter, you suugest to use istringstream
> class for RAM based string...
> But istringstream want to get only std::string class.
> But I have just char* or my own string class.

An alternative that stays within the IOStreams framework would be to use

> This is my implementation of InputBuffer subclass.
> Please look if I correctly work with EOF. It must be -1, yes ?

Though that's probably a pretty reliable assumption, I don't think it's
required to be. char_traits<char>::eof() should be reliable, though.

Braden McDaniel                           e-mail: <braden at endoframe.com>
<http://endoframe.com>                    Jabber: <braden at jabber.org>


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list