#include <src/util/ExprParser.h>
Public Types | |
enum | binary_operator { b_plus, b_minus, mal, durch, modulo, hoch, undef, oder, und, gleich, b_nicht, kleiner, groesser, ungleich, kleinergleich, groessergleich } |
enum | unary_operator { u_plus, u_minus, u_nicht } |
Public Member Functions | |
ExprParser (const std::string &str) | |
const std::string & | getRemains () |
double | getResult () |
bool | getSuccess () |
Private Member Functions | |
double | parse_argument () |
binary_operator | parse_binary_operator () |
double | parse_expr_1 () |
double | parse_expr_2 () |
double | parse_expr_3 () |
double | parse_expr_4 () |
double | parse_expr_5 () |
double | parse_expr_6 () |
double | parse_expr_7 () |
double | parse_expr_8 () |
double | parse_last_argument () |
unary_operator | parse_unary_operator () |
char * | parse_word (char *str) |
Private Attributes | |
bool | failed_ |
binary_operator | op |
const char * | reading_stream |
std::string | remains_ |
double | result_ |
orxonox::ExprParser::ExprParser | ( | const std::string & | str | ) |
References failed_, parse_expr_8(), reading_stream, remains_, and result_.
const std::string& orxonox::ExprParser::getRemains | ( | ) | [inline] |
Referenced by orxonox::calculate().
double orxonox::ExprParser::getResult | ( | ) | [inline] |
Referenced by orxonox::calculate().
bool orxonox::ExprParser::getSuccess | ( | ) | [inline] |
Referenced by orxonox::calculate().
double orxonox::ExprParser::parse_argument | ( | ) | [private] |
ExprParser::binary_operator orxonox::ExprParser::parse_binary_operator | ( | ) | [private] |
double orxonox::ExprParser::parse_expr_1 | ( | ) | [private] |
References CASE, CASE_1, CASE_ELSE, failed_, op, parse_argument(), PARSE_BLANKS, parse_last_argument(), parse_unary_operator(), parse_word(), reading_stream, u_minus, u_nicht, and u_plus.
Referenced by parse_expr_2().
double orxonox::ExprParser::parse_expr_2 | ( | ) | [private] |
References hoch, op, parse_binary_operator(), parse_expr_1(), reading_stream, and undef.
Referenced by parse_expr_3().
double orxonox::ExprParser::parse_expr_3 | ( | ) | [private] |
double orxonox::ExprParser::parse_expr_4 | ( | ) | [private] |
double orxonox::ExprParser::parse_expr_5 | ( | ) | [private] |
References groesser, groessergleich, kleiner, kleinergleich, op, and parse_expr_4().
Referenced by parse_expr_6().
double orxonox::ExprParser::parse_expr_6 | ( | ) | [private] |
double orxonox::ExprParser::parse_expr_7 | ( | ) | [private] |
double orxonox::ExprParser::parse_expr_8 | ( | ) | [private] |
References oder, op, and parse_expr_7().
Referenced by ExprParser(), parse_argument(), and parse_last_argument().
double orxonox::ExprParser::parse_last_argument | ( | ) | [private] |
ExprParser::unary_operator orxonox::ExprParser::parse_unary_operator | ( | ) | [private] |
char * orxonox::ExprParser::parse_word | ( | char * | str | ) | [private] |
bool orxonox::ExprParser::failed_ [private] |
Referenced by ExprParser(), parse_argument(), parse_expr_1(), parse_last_argument(), and parse_word().
binary_operator orxonox::ExprParser::op [private] |
Referenced by parse_binary_operator(), parse_expr_1(), parse_expr_2(), parse_expr_3(), parse_expr_4(), parse_expr_5(), parse_expr_6(), parse_expr_7(), and parse_expr_8().
const char* orxonox::ExprParser::reading_stream [private] |
std::string orxonox::ExprParser::remains_ [private] |
Referenced by ExprParser().
double orxonox::ExprParser::result_ [private] |
Referenced by ExprParser().