A source of tokens extracted from a character array. More...
#include <cpp_token_stream.h>
Public Member Functions | |
CPP_Buffer_Token_Source (char const *begin, char const *end, std::string f, CPP_Token_Stream_Prep const *h=0) | |
CPP_Buffer_Token_Source (char const *begin, char const *end, CPP_Token_Stream_Prep const *h=0) | |
char const * | cur () const |
current location in the input buffer | |
char const * | end () const |
end location in the input buffer | |
void | operator() (CPP_Token &token) |
Read the next token from the stream. | |
Private Attributes | |
CPP_Token_Stream< char const * > | stream_ |
token source object |
A source of tokens extracted from a character array.
Definition at line 1333 of file cpp_token_stream.h.
CPP_Buffer_Token_Source | ( | char const * | begin, | |
char const * | end, | |||
CPP_Token_Stream_Prep const * | h = 0 | |||
) |
Construct a token source from a pointer to the beginning and ending of a character buffer.
begin | the first character of the string of tokens | |
end | the last character of the token source | |
h | the preprocessor directive handler. |
Definition at line 1344 of file cpp_token_stream.h.
CPP_Buffer_Token_Source | ( | char const * | begin, | |
char const * | end, | |||
std::string | f, | |||
CPP_Token_Stream_Prep const * | h = 0 | |||
) |
Construct a token source from a character buffer but pretend it is from a file whose name is specified (and an optional preprocessor directive handler).
begin | the first character of the string of tokens | |
end | the last character of the token source | |
f | the name of the file to pretend to use | |
h | the preprocessor directive handler. |
Definition at line 1358 of file cpp_token_stream.h.
char const* cur | ( | ) | const |
current location in the input buffer
Definition at line 1384 of file cpp_token_stream.h.
char const* end | ( | ) | const |
end location in the input buffer
Definition at line 1385 of file cpp_token_stream.h.
void operator() | ( | CPP_Token & | token | ) | [virtual] |
Read the next token from the stream.
token | the destination of the parsed token |
Implements CPP_Token_Source.
Definition at line 1376 of file cpp_token_stream.h.
CPP_Token_Stream<char const *> stream_ [private] |
token source object
Definition at line 1340 of file cpp_token_stream.h.