Base class for preprocessing an input. More...
Public Member Functions | |
preprocessor * | get_old_preprocessor () |
Preprocesses and sends some text to the target_ buffer. More... | |
virtual bool | get_chunk ()=0 |
virtual int | is_macro () |
retruns 1 if this parses a macro, -1 if this doesnt parse text (if this is no preprocessor_data). 0 otherwise (this parses a file). More... | |
virtual | ~preprocessor () |
Restores the old preprocessing context of target_. More... | |
Protected Member Functions | |
preprocessor (preprocessor_streambuf &) | |
Sets up a new preprocessor for stream buffer t. More... | |
Protected Attributes | |
preprocessor_streambuf & | target_ |
Private Attributes | |
preprocessor *const | old_preprocessor_ |
std::string | old_textdomain_ |
std::string | old_location_ |
int | old_linenum_ |
Base class for preprocessing an input.
Definition at line 196 of file preprocessor.cpp.
|
protected |
Sets up a new preprocessor for stream buffer t.
Saves the current preprocessing context of target_. It will be automatically restored on destruction.
Definition at line 403 of file preprocessor.cpp.
References preprocessor_streambuf::current_, preprocessor_streambuf::depth_, and target_.
|
virtual |
Restores the old preprocessing context of target_.
Appends location and domain directives to the buffer, so that the parser notices these changes.
Definition at line 419 of file preprocessor.cpp.
References preprocessor_streambuf::buffer_, preprocessor_streambuf::current_, preprocessor_streambuf::depth_, preprocessor_streambuf::linenum_, preprocessor_streambuf::location_, old_linenum_, old_location_, old_preprocessor_, old_textdomain_, target_, and preprocessor_streambuf::textdomain_.
|
pure virtual |
Implemented in preprocessor_data, and preprocessor_file.
Referenced by preprocessor_streambuf::underflow().
|
inline |
Preprocesses and sends some text to the target_ buffer.
Definition at line 210 of file preprocessor.cpp.
References old_preprocessor_.
Referenced by preprocessor_streambuf::get_current_file().
|
inlinevirtual |
retruns 1 if this parses a macro, -1 if this doesnt parse text (if this is no preprocessor_data). 0 otherwise (this parses a file).
Reimplemented in preprocessor_data.
Definition at line 213 of file preprocessor.cpp.
Referenced by preprocessor_streambuf::get_current_file().
|
private |
Definition at line 201 of file preprocessor.cpp.
Referenced by ~preprocessor().
|
private |
Definition at line 200 of file preprocessor.cpp.
Referenced by ~preprocessor().
|
private |
Definition at line 198 of file preprocessor.cpp.
Referenced by get_old_preprocessor(), and ~preprocessor().
|
private |
Definition at line 199 of file preprocessor.cpp.
Referenced by ~preprocessor().
|
protected |
Definition at line 203 of file preprocessor.cpp.
Referenced by preprocessor_file::get_chunk(), preprocessor_data::get_chunk(), preprocessor(), preprocessor_file::preprocessor_file(), preprocessor_data::push_token(), preprocessor_data::put(), and ~preprocessor().