#include <cppExpressionParser.h>
Inheritance diagram for CPPExpressionParser:
Public Types | |
typedef map< string, CPPManifest * > | Manifests |
typedef set< CPPFile > | ParsedFiles |
typedef set< string > | Includes |
Public Member Functions | |
CPPExpressionParser (CPPScope *current_scope, CPPScope *global_scope) | |
~CPPExpressionParser () | |
bool | parse_expr (const string &expr) |
bool | parse_expr (const string &expr, const CPPPreprocessor &filepos) |
void | output (ostream &out) const |
void | set_verbose (int verbose) |
Sets the verbosity level of the parser. | |
int | get_verbose () const |
Returns the verbosity level of the parser. | |
void | copy_filepos (const CPPPreprocessor &other) |
CPPFile | get_file () const |
int | get_line_number () const |
int | get_col_number () const |
CPPToken | get_next_token () |
void | warning (const string &message, int line=0, int col=0, CPPFile file=CPPFile()) |
void | error (const string &message, int line=0, int col=0, CPPFile file=CPPFile()) |
CPPCommentBlock * | get_comment_before (int line, CPPFile file) |
Returns the CPPCommentBlock immediately preceding the indicated line, if any. | |
int | get_warning_count () const |
int | get_error_count () const |
Public Attributes | |
CPPScope * | _current_scope |
CPPScope * | _global_scope |
CPPExpression * | _expr |
Manifests | _manifests |
DSearchPath | _include_path |
DSearchPath | _system_include_path |
CPPComments | _comments |
ParsedFiles | _parsed_files |
Includes | _quote_includes |
Includes | _angle_includes |
bool | _resolve_identifiers |
int | _verbose |
Protected Member Functions | |
bool | init_cpp (const CPPFile &file) |
bool | init_const_expr (const string &expr) |
bool | init_type (const string &type) |
bool | push_file (const CPPFile &file) |
bool | push_string (const string &input, bool lock_position) |
string | expand_manifests (const string &input_expr) |
Given a string, expand all manifests within the string and return the new string. | |
CPPExpression * | parse_expr (const string &expr, CPPScope *current_scope, CPPScope *global_scope) |
Given a string, expand all manifests within the string and evaluate it as an expression. |
|
Definition at line 91 of file cppPreprocessor.h. |
|
Definition at line 80 of file cppPreprocessor.h. |
|
Definition at line 88 of file cppPreprocessor.h. |
|
Definition at line 34 of file cppExpressionParser.cxx. |
|
Definition at line 49 of file cppExpressionParser.cxx. References _current_scope, _expr, _global_scope, CPPPreprocessor::get_error_count(), CPPPreprocessor::init_const_expr(), and parse_const_expr(). |
|
Definition at line 255 of file cppPreprocessor.cxx. References CPPPreprocessor::_files. |
|
Definition at line 510 of file cppPreprocessor.cxx. References CPPPreprocessor::_error_count. Referenced by CPPIdentifier::get_scope(), and CPPIdentifier::is_tbd(). |
|
Given a string, expand all manifests within the string and return the new string.
Definition at line 731 of file cppPreprocessor.cxx. References _expr, CPPPreprocessor::_verbose, current_scope, global_scope, NULL, and parse_expr(). Referenced by CPPPreprocessor::handle_undef_directive(). |
|
Definition at line 300 of file cppPreprocessor.cxx. References CPPPreprocessor::_saved_tokens. Referenced by CPPPreprocessor::handle_error_directive(), CPPPreprocessor::handle_include_directive(), CPPPreprocessor::init_const_expr(), and CPPPreprocessor::set_verbose(). |
|
Returns the CPPCommentBlock immediately preceding the indicated line, if any. If there is no such comment, returns NULL. Definition at line 571 of file cppPreprocessor.cxx. References CPPPreprocessor::_saved_tokens, CPPPreprocessor::_state, CPPPreprocessor::push_string(), and CPPPreprocessor::S_normal. Referenced by CPPScope::set_current_vis(). |
|
Definition at line 554 of file cppPreprocessor.cxx. References CPPPreprocessor::_last_c, CPPPreprocessor::_saved_tokens, CPPPreprocessor::_state, CPPPreprocessor::push_file(), and CPPPreprocessor::S_normal. Referenced by CPPParser::is_fully_specified(), ~CPPExpressionParser(), and CPPTypeParser::~CPPTypeParser(). |
|
Definition at line 270 of file cppPreprocessor.cxx. References CPPPreprocessor::_files. Referenced by CPPPreprocessor::handle_error_directive(), CPPPreprocessor::handle_include_directive(), CPPPreprocessor::init_const_expr(), and CPPPreprocessor::set_verbose(). |
|
Definition at line 285 of file cppPreprocessor.cxx. References CPPPreprocessor::_files. Referenced by CPPPreprocessor::handle_error_directive(), CPPPreprocessor::handle_include_directive(), CPPPreprocessor::init_const_expr(), and CPPPreprocessor::set_verbose(). |
|
Definition at line 315 of file cppPreprocessor.cxx. Referenced by CPPPreprocessor::get(). |
|
Returns the verbosity level of the parser.
Definition at line 243 of file cppPreprocessor.cxx. References CPPPreprocessor::_files. |
|
Definition at line 542 of file cppPreprocessor.cxx. References NULL. |
|
Definition at line 624 of file cppPreprocessor.cxx. References CPPPreprocessor::_files, CPPPreprocessor::get_col_number(), CPPPreprocessor::get_file(), CPPPreprocessor::get_line_number(), and indent(). Referenced by ~CPPExpressionParser(). |
|
Definition at line 608 of file cppPreprocessor.cxx. References CPPPreprocessor::_last_c, CPPPreprocessor::_parsed_files, and CPPPreprocessor::_start_of_line. Referenced by CPPParser::is_fully_specified(). |
|
Definition at line 639 of file cppPreprocessor.cxx. References CPPPreprocessor::_files. Referenced by CPPTypeParser::~CPPTypeParser(). |
|
Definition at line 100 of file cppExpressionParser.cxx. |
|
Given a string, expand all manifests within the string and evaluate it as an expression. Returns NULL if the string is not a valid expression. This is an internal support function for CPPPreprocessor; however, there is a public variant of this function defined for CPPParser. Definition at line 802 of file cppPreprocessor.cxx. Referenced by CPPParser::parse_file(). |
|
Definition at line 79 of file cppExpressionParser.cxx. |
|
Definition at line 60 of file cppExpressionParser.cxx. Referenced by CPPPreprocessor::expand_manifests(). |
|
Definition at line 654 of file cppPreprocessor.cxx. References CPPPreprocessor::_files. Referenced by CPPPreprocessor::get_error_count(). |
|
Definition at line 685 of file cppPreprocessor.cxx. References CPPPreprocessor::_manifests, CPPPreprocessor::expand_defined_function(), CPPPreprocessor::expand_manifest_inline(), and size_t. Referenced by CPPPreprocessor::get_comment_before(). |
|
Sets the verbosity level of the parser. At 0, no warnings will be reported; at 1 or higher, expect to get spammed. Definition at line 230 of file cppPreprocessor.cxx. References CPPPreprocessor::_files, CPPPreprocessor::get_col_number(), CPPPreprocessor::get_file(), and CPPPreprocessor::get_line_number(). |
|
|
Definition at line 93 of file cppPreprocessor.h. |
|
Definition at line 86 of file cppPreprocessor.h. Referenced by CPPPreprocessor::skip_c_comment(). |
|
Definition at line 48 of file cppExpressionParser.h. Referenced by ~CPPExpressionParser(). |
|
Definition at line 50 of file cppExpressionParser.h. Referenced by CPPPreprocessor::expand_manifests(), and ~CPPExpressionParser(). |
|
Definition at line 49 of file cppExpressionParser.h. Referenced by ~CPPExpressionParser(). |
|
Definition at line 83 of file cppPreprocessor.h. |
|
Definition at line 81 of file cppPreprocessor.h. Referenced by CPPPreprocessor::get_preprocessor_command(), CPPPreprocessor::handle_error_directive(), CPPPreprocessor::push_string(), and CPPPreprocessor::skip_false_if_block(). |
|
Definition at line 89 of file cppPreprocessor.h. Referenced by CPPPreprocessor::init_cpp(). |
|
Definition at line 92 of file cppPreprocessor.h. Referenced by CPPPreprocessor::handle_ifdef_directive(). |
|
Definition at line 100 of file cppPreprocessor.h. |
|
Definition at line 84 of file cppPreprocessor.h. |
|
Definition at line 106 of file cppPreprocessor.h. Referenced by CPPPreprocessor::expand_manifests(). |