]>
git.saurik.com Git - apple/security.git/blob - Security/libsecurity_codesigning/antlr2/src/CharBuffer.cpp
1 /* ANTLR Translator Generator
2 * Project led by Terence Parr at http://www.jGuru.com
3 * Software rights: http://www.antlr.org/license.html
5 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/CharBuffer.cpp#2 $
8 #include "antlr/CharBuffer.hpp"
13 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
17 /* RK: Per default istream does not throw exceptions. This can be
19 * stream.exceptions(ios_base::badbit|ios_base::failbit|ios_base::eofbit);
21 * We could try catching the bad/fail stuff. But handling eof via this is
22 * not a good idea. EOF is best handled as a 'normal' character.
24 * So this does not work yet with gcc... Comment it until I get to a platform
28 /** Create a character buffer. Enable fail and bad exceptions, if supported
30 CharBuffer::CharBuffer(ANTLR_USE_NAMESPACE(std
)istream
& input_
)
33 // input.exceptions(ANTLR_USE_NAMESPACE(std)ios_base::badbit|
34 // ANTLR_USE_NAMESPACE(std)ios_base::failbit);
37 /** Get the next character from the stream. May throw CharStreamIOException
38 * when something bad happens (not EOF) (if supported by platform).
40 int CharBuffer::getChar()
45 // catch (ANTLR_USE_NAMESPACE(std)ios_base::failure& e) {
46 // throw CharStreamIOException(e);
50 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE