Orxonox: orxonox::ExprParser Class Reference

# orxonox::ExprParser Class Reference

`#include <src/util/ExprParser.h>`

List of all members.

## 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_

## Member Enumeration Documentation

enum orxonox::ExprParser::binary_operator

Enumerator:

  b_plus |
  b_minus |
  mal |
  durch |
  modulo |
  hoch |
  undef |
  oder |
  und |
  gleich |
  b_nicht |
  kleiner |
  groesser |
  ungleich |
  kleinergleich |
  groessergleich |

enum orxonox::ExprParser::unary_operator

Enumerator:

  u_plus |
  u_minus |
  u_nicht |

## Constructor & Destructor Documentation

orxonox::ExprParser::ExprParser | ( | const std::string & | str | ) |

References failed_, parse_expr_8(), reading_stream, remains_, and result_.

## Member Function Documentation

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]`

References failed_, parse_expr_8(), and reading_stream.

Referenced by parse_expr_1().

ExprParser::binary_operator orxonox::ExprParser::parse_binary_operator | ( |  | ) | `[private]`

References b_minus, b_nicht, b_plus, durch, gleich, groesser, hoch, kleiner, mal, modulo, oder, op, reading_stream, und, and undef.

Referenced by parse_expr_2().

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]`

References durch, mal, modulo, op, and parse_expr_2().

Referenced by parse_expr_4().

double orxonox::ExprParser::parse_expr_4 | ( |  | ) | `[private]`

References b_minus, b_plus, op, and parse_expr_3().

Referenced by parse_expr_5().

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]`

References gleich, op, parse_expr_5(), and ungleich.

Referenced by parse_expr_7().

double orxonox::ExprParser::parse_expr_7 | ( |  | ) | `[private]`

References op, parse_expr_6(), and und.

Referenced by parse_expr_8().

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]`

References failed_, parse_expr_8(), and reading_stream.

Referenced by parse_expr_1().

ExprParser::unary_operator orxonox::ExprParser::parse_unary_operator | ( |  | ) | `[private]`

References reading_stream, u_minus, u_nicht, and u_plus.

Referenced by parse_expr_1().

char * orxonox::ExprParser::parse_word | ( | char * | str | ) | `[private]`

References failed_, and reading_stream.

Referenced by parse_expr_1().

## Member Data Documentation

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]`

Referenced by ExprParser(), parse_argument(), parse_binary_operator(), parse_expr_1(), parse_expr_2(), parse_last_argument(), parse_unary_operator(), and parse_word().

std::string orxonox::ExprParser::remains_`[private]`

Referenced by ExprParser().

double orxonox::ExprParser::result_`[private]`

Referenced by ExprParser().

The documentation for this class was generated from the following files:

- src/util/ExprParser.h
- src/util/ExprParser.cc