Changeset 1894 for code/trunk/src/util/ExprParser.h
- Timestamp:
- Oct 8, 2008, 12:24:58 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/util/ExprParser.h
r1505 r1894 41 41 { 42 42 public: 43 enum binary_operator44 {45 b_plus,46 b_minus,47 mal,48 durch,49 modulo,50 hoch,51 undef,52 oder,53 und,54 gleich,55 b_nicht,56 kleiner,57 groesser,58 ungleich,59 kleinergleich,60 groessergleich61 };43 enum binary_operator 44 { 45 b_plus, 46 b_minus, 47 mal, 48 durch, 49 modulo, 50 hoch, 51 undef, 52 oder, 53 und, 54 gleich, 55 b_nicht, 56 kleiner, 57 groesser, 58 ungleich, 59 kleinergleich, 60 groessergleich 61 }; 62 62 63 enum unary_operator64 {65 u_plus,66 u_minus,67 u_nicht68 };63 enum unary_operator 64 { 65 u_plus, 66 u_minus, 67 u_nicht 68 }; 69 69 70 70 71 ExprParser(const std::string& str);72 std::string& getRemains() { return this->remains_; }73 double getResult() { return this->result_; }74 bool getSuccess() { return !this->failed_; }71 ExprParser(const std::string& str); 72 std::string& getRemains() { return this->remains_; } 73 double getResult() { return this->result_; } 74 bool getSuccess() { return !this->failed_; } 75 75 76 76 private: 77 double parse_expr_1();78 double parse_expr_2();79 double parse_expr_3();80 double parse_expr_4();81 double parse_expr_5();82 double parse_expr_6();83 double parse_expr_7();84 double parse_expr_8();85 char* parse_word(char* str);86 binary_operator parse_binary_operator();87 unary_operator parse_unary_operator();77 double parse_expr_1(); 78 double parse_expr_2(); 79 double parse_expr_3(); 80 double parse_expr_4(); 81 double parse_expr_5(); 82 double parse_expr_6(); 83 double parse_expr_7(); 84 double parse_expr_8(); 85 char* parse_word(char* str); 86 binary_operator parse_binary_operator(); 87 unary_operator parse_unary_operator(); 88 88 89 double parse_argument();90 double parse_last_argument();89 double parse_argument(); 90 double parse_last_argument(); 91 91 92 binary_operator op;93 const char* reading_stream;94 bool failed_;95 double result_;96 std::string remains_;92 binary_operator op; 93 const char* reading_stream; 94 bool failed_; 95 double result_; 96 std::string remains_; 97 97 98 98 };
Note: See TracChangeset
for help on using the changeset viewer.