20 #ifndef __REXEVAL_INC__
21 #define __REXEVAL_INC__
28 #include <libbbb/libbbb.h>
29 #include <libbbb/list2d.h>
133 static OpData opers_[OP_Max];
149 void setError (
const QString & s ) {
151 s_err_.append(
"\n" );
156 bool isOperatorSymbol ( QChar c )
const {
157 static QString s_op =
"+-*\\%/^()[]{}=&|!<>";
158 return ( s_op.contains( c ) );
163 bool hasErrors (
void )
const {
164 return s_err_.isEmpty() ==
false;
169 const QString & errorString (
void )
const {
175 static bool isAssociative (
OperatorTk * op1, Associativity asoc );
176 static bool isOperator (
BaseTk * btk );
178 void addOperator(
const QString &s);
179 void addOperand(
const QString &s);
181 OperandTk *oneDouble(RexEval *ev,
double &d1);
182 OperandTk *twoDoubles(RexEval *ev,
double &d1,
double &d2);
185 static void opKbAdd ( RexEval * ev );
186 static void opKbAnd ( RexEval * ev );
187 static void opKbDiv ( RexEval * ev );
188 static void opKbEqu ( RexEval * ev );
189 static void opKbGreatEqu ( RexEval * ev );
190 static void opKbGreat ( RexEval * ev );
191 static void opKbIDiv ( RexEval * ev );
192 static void opKbMod ( RexEval * ev );
193 static void opKbMul ( RexEval * ev );
194 static void opKbNot ( RexEval * ev );
195 static void opKbOr ( RexEval * ev );
196 static void opKbPow ( RexEval * ev );
197 static void opKbSmallEqu ( RexEval * ev );
198 static void opKbSmall ( RexEval * ev );
199 static void opKbSub ( RexEval * ev );
201 double resultDouble (
void );
202 QString resultString (
void );
203 bool resultBool (
void );
205 void dumpChain (
List2Dh * hdr );
223 #endif // __REXEVAL_INC__