1 #ifndef INC_CharBuffer_hpp__
2 #define INC_CharBuffer_hpp__
4 /* ANTLR Translator Generator
5 * Project led by Terence Parr at http://www.jGuru.com
6 * Software rights: http://www.antlr.org/license.html
8 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CharBuffer.hpp#2 $
11 #include <antlr/config.hpp>
15 #include <antlr/InputBuffer.hpp>
17 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
21 /**A Stream of characters fed to the lexer from a InputStream that can
22 * be rewound via mark()/rewind() methods.
24 * A dynamic array is used to buffer up all the input characters. Normally,
25 * "k" characters are stored in the buffer. More characters may be stored
26 * during guess mode (testing syntactic predicate), or when LT(i>k) is
28 * Consumption of characters is deferred. In other words, reading the next
29 * character is not done by consume(), but deferred until needed by LA or LT.
32 * @see antlr.CharQueue
35 class ANTLR_API CharBuffer : public InputBuffer {
37 /// Create a character buffer
38 CharBuffer( ANTLR_USE_NAMESPACE(std)istream& input );
39 /// Get the next character from the stream
44 ANTLR_USE_NAMESPACE(std)istream& input;
47 // NOTE: Unimplemented
48 CharBuffer(const CharBuffer& other);
49 CharBuffer& operator=(const CharBuffer& other);
52 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
56 #endif //INC_CharBuffer_hpp__