78 warn(fileName,lineNr,
"problem evaluating expression '%s': %s",
92 return c==
'&' || c==
'|' || c==
'!';
100 return (c>=
'A' && c<=
'Z') || (c>=
'a' && c<=
'z') || c==
'_';
105 return isAlpha(c) || (c>=
'0' && c<=
'9');
115 if (opName==
"&&") {
return AND; }
116 if (opName==
"||") {
return OR; }
119 if (opName==
"!") {
return NOT; }
137 while (*
m_e ==
' ' || *
m_e ==
'\t')
151 if (*
m_e ==
'(' || *
m_e ==
')')
199 while (opId==
AND || opId==
OR)
244 m_err=
"Parenthesis ) missing";
272 m_err=
"Unexpected end of expression";
277 m_err=
"Value expected";
293 case AND:
return lhs && rhs;
294 case OR:
return lhs || rhs;
TOKENTYPE m_tokenType
type of the token
bool evalOperator(const int opId, bool lhs, bool rhs)
static bool isAlpha(const char c)
#define Config_getList(val)
static bool isDelimiter(const char c)
QCString m_token
holds the token
const char * data() const
static bool isAlphaNum(const char c)
void warn(const char *file, int line, const char *fmt,...)
QCString & setNum(short n)
QCString m_expr
holds the expression
bool evalVariable(const char *varName)
bool parse(const char *fileName, int lineNr, const char *expr)
QCString m_err
error state
const char * m_e
points to a character in expr
int getOperatorId(const QCString &opName)