Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 8, 2008, 12:24:58 AM (16 years ago)
Author:
rgrieder
Message:
  • Converted ExprParser to 4 spaces/tab
  • Tiny little bug in String.cc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/ExprParser.h

    r1505 r1894  
    4141{
    4242public:
    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   };
     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    };
    6262
    63   enum unary_operator
    64   {
    65     u_plus,
    66     u_minus,
    67     u_nicht
    68   };
     63    enum unary_operator
     64    {
     65        u_plus,
     66        u_minus,
     67        u_nicht
     68    };
    6969
    7070
    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_; }
    7575
    7676private:
    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();
    8888
    89   double parse_argument();
    90   double parse_last_argument();
     89    double parse_argument();
     90    double parse_last_argument();
    9191
    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_;
    9797
    9898};
Note: See TracChangeset for help on using the changeset viewer.