#include <tokenizer.hpp>
Public Member Functions | |
tokenizer (std::istream &in) | |
~tokenizer () | |
const token & | next_token () |
const token & | current_token () const |
std::string | get_line () const |
std::string & | textdomain () |
Protected Member Functions | |
tokenizer () | |
void | next_char () |
void | next_char_fast () |
int | peek_char () const |
Protected Attributes | |
int | current_ |
size_t | lineno_ |
Private Member Functions | |
bool | is_space (const int c) const |
bool | is_alnum (const int c) const |
void | skip_comment () |
Private Attributes | |
std::string | textdomain_ |
std::string | file_ |
size_t | tokenstart_lineno_ |
token | token_ |
std::istream & | in_ |
Definition at line 58 of file tokenizer.hpp.
tokenizer::tokenizer | ( | std::istream & | in | ) |
tokenizer::~tokenizer | ( | ) | [inline] |
Definition at line 62 of file tokenizer.hpp.
tokenizer::tokenizer | ( | ) | [protected] |
const token & tokenizer::next_token | ( | ) |
Definition at line 119 of file tokenizer.cpp.
References current_, token::END, is_alnum(), is_space(), token::leading_spaces, lineno_, token::MISC, next_char(), next_char_fast(), peek_char(), token::QSTRING, skip_comment(), token::STRING, token_, tokenstart_lineno_, token::type, token::UNTERMINATED_QSTRING, and token::value.
const token & tokenizer::current_token | ( | ) | const |
std::string tokenizer::get_line | ( | ) | const |
std::string & tokenizer::textdomain | ( | ) |
void tokenizer::next_char | ( | ) | [inline, protected] |
Definition at line 74 of file tokenizer.hpp.
References current_, lineno_, next_char_fast(), and UNLIKELY.
Referenced by next_token().
void tokenizer::next_char_fast | ( | ) | [inline, protected] |
Definition at line 81 of file tokenizer.hpp.
References current_, in_, LIKELY, and UNLIKELY.
Referenced by next_char(), next_token(), skip_comment(), and tokenizer().
int tokenizer::peek_char | ( | ) | const [inline, protected] |
bool tokenizer::is_space | ( | const int | c | ) | const [private] |
bool tokenizer::is_alnum | ( | const int | c | ) | const [private] |
void tokenizer::skip_comment | ( | ) | [private] |
Definition at line 39 of file tokenizer.cpp.
References current_, file_, lexical_cast(), lineno_, next_char_fast(), and textdomain_.
Referenced by next_token().
int tokenizer::current_ [protected] |
Definition at line 71 of file tokenizer.hpp.
Referenced by next_char(), next_char_fast(), next_token(), and skip_comment().
size_t tokenizer::lineno_ [protected] |
Definition at line 72 of file tokenizer.hpp.
Referenced by next_char(), next_token(), and skip_comment().
std::string tokenizer::textdomain_ [private] |
std::string tokenizer::file_ [private] |
size_t tokenizer::tokenstart_lineno_ [private] |
token tokenizer::token_ [private] |
std::istream& tokenizer::in_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |