Public Member Functions | |
preprocessor_data (preprocessor_streambuf &, std::vector< std::string > *, std::istream *, std::string const &history, std::string const &name, int line, std::string const &dir, std::string const &domain, std::string *=NULL) | |
~preprocessor_data () | |
virtual bool | get_chunk () |
Private Member Functions | |
std::string | read_word () |
std::string | read_line () |
void | skip_spaces () |
void | skip_eol () |
void | push_token (char) |
void | pop_token () |
void | put (char) |
void | put (std::string const &) |
Private Attributes | |
scoped_istream | in_ |
std::string | directory_ |
std::vector< std::string > | strings_ |
std::vector< token_desc > | tokens_ |
bool | is_macro |
int | slowpath_ |
int | skipping_ |
int | linenum_ |
Classes | |
struct | token_desc |
Definition at line 266 of file preprocessor.cpp.
preprocessor_data::preprocessor_data | ( | preprocessor_streambuf & | t, | |
std::vector< std::string > * | callstack, | |||
std::istream * | i, | |||
std::string const & | history, | |||
std::string const & | name, | |||
int | line, | |||
std::string const & | dir, | |||
std::string const & | domain, | |||
std::string * | symbol = NULL | |||
) |
Definition at line 347 of file preprocessor.cpp.
References preprocessor_streambuf::buffer_, preprocessor_streambuf::buffer_size_, preprocessor::called_macros_, count_extra_digits(), utils::escape(), is_macro, preprocessor_streambuf::linenum_, preprocessor_streambuf::location_, push_token(), and preprocessor_streambuf::textdomain_.
Referenced by get_chunk().
preprocessor_data::~preprocessor_data | ( | ) |
Definition at line 393 of file preprocessor.cpp.
References preprocessor::called_macros_, and is_macro.
std::string preprocessor_data::read_word | ( | ) | [private] |
Definition at line 442 of file preprocessor.cpp.
References in_, and utils::portable_isspace().
Referenced by get_chunk().
std::string preprocessor_data::read_line | ( | ) | [private] |
void preprocessor_data::skip_spaces | ( | ) | [private] |
void preprocessor_data::skip_eol | ( | ) | [private] |
void preprocessor_data::push_token | ( | char | t | ) | [private] |
Definition at line 401 of file preprocessor.cpp.
References linenum_, preprocessor_streambuf::location_, skipping_, slowpath_, strings_, preprocessor::target_, preprocessor_streambuf::textdomain_, and tokens_.
Referenced by get_chunk(), and preprocessor_data().
void preprocessor_data::pop_token | ( | ) | [private] |
Definition at line 413 of file preprocessor.cpp.
References strings_, and tokens_.
Referenced by get_chunk().
void preprocessor_data::put | ( | char | c | ) | [private] |
Definition at line 472 of file preprocessor.cpp.
References preprocessor_streambuf::buffer_, preprocessor_streambuf::buffer_size_, count_extra_digits(), preprocessor_streambuf::linenum_, linenum_, preprocessor_streambuf::location_, skipping_, slowpath_, strings_, and preprocessor::target_.
Referenced by get_chunk().
void preprocessor_data::put | ( | std::string const & | s | ) | [private] |
Definition at line 498 of file preprocessor.cpp.
References preprocessor_streambuf::buffer_, preprocessor_streambuf::buffer_size_, skipping_, slowpath_, strings_, and preprocessor::target_.
bool preprocessor_data::get_chunk | ( | ) | [virtual] |
Implements preprocessor.
Definition at line 511 of file preprocessor.cpp.
References preproc_define::arguments, b, unit_map::begin(), buf, preprocessor::called_macros_, command, DBG_CF, preprocessor_streambuf::defines_, preprocessor_streambuf::depth_, directory_, directory_name(), ERR_CF, preprocessor_streambuf::error(), file_exists(), get_user_data_dir(), in_, is_directory(), preproc_define::linenum, linenum_, preproc_define::location, preprocessor_streambuf::location_, LOG_CF, pop_token(), utils::portable_isspace(), pos, preprocessor_data(), push_token(), put(), preprocessor_streambuf::quoted_, read_line(), read_word(), skip_eol(), skip_spaces(), skipping_, slowpath_, utils::split(), preprocessor_data::token_desc::stack_pos, strings_, preprocessor::target_, preproc_define::textdomain, preprocessor_streambuf::textdomain_, tokens_, preprocessor_data::token_desc::type, and preproc_define::value.
scoped_istream preprocessor_data::in_ [private] |
Definition at line 275 of file preprocessor.cpp.
Referenced by get_chunk(), read_line(), read_word(), skip_eol(), and skip_spaces().
std::string preprocessor_data::directory_ [private] |
std::vector< std::string > preprocessor_data::strings_ [private] |
Definition at line 277 of file preprocessor.cpp.
Referenced by get_chunk(), pop_token(), push_token(), and put().
std::vector< token_desc > preprocessor_data::tokens_ [private] |
Definition at line 278 of file preprocessor.cpp.
Referenced by get_chunk(), pop_token(), and push_token().
bool preprocessor_data::is_macro [private] |
Definition at line 279 of file preprocessor.cpp.
Referenced by preprocessor_data(), and ~preprocessor_data().
int preprocessor_data::slowpath_ [private] |
Definition at line 280 of file preprocessor.cpp.
Referenced by get_chunk(), push_token(), and put().
int preprocessor_data::skipping_ [private] |
Definition at line 280 of file preprocessor.cpp.
Referenced by get_chunk(), push_token(), and put().
int preprocessor_data::linenum_ [private] |
Definition at line 280 of file preprocessor.cpp.
Referenced by get_chunk(), push_token(), put(), read_line(), and skip_eol().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |