#include <condparser.h>
Public Member Functions | |
CondParser () | |
bool | parse (const char *fileName, int lineNr, const char *expr) |
Private Types | |
enum | TOKENTYPE { NOTHING = -1, DELIMITER, VARIABLE, UNKNOWN } |
enum | OPERATOR_ID { UNKNOWN_OP = -1, AND = 1, OR, NOT } |
Private Member Functions | |
void | getToken () |
bool | parseLevel1 () |
bool | parseLevel2 () |
bool | parseLevel3 () |
bool | parseVar () |
bool | evalOperator (const int opId, bool lhs, bool rhs) |
bool | evalVariable (const char *varName) |
int | getOperatorId (const QCString &opName) |
Private Attributes | |
QCString | m_err |
error state More... | |
QCString | m_expr |
holds the expression More... | |
const char * | m_e |
points to a character in expr More... | |
QCString | m_token |
holds the token More... | |
TOKENTYPE | m_tokenType |
type of the token More... | |
Copyright (C) 1997-2015 by Dimitri van Heesch.
Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. See the GNU General Public License for more details.
Documents produced by Doxygen are derivative works derived from the input used in their production; they are not affected by this license.
C++ Expression parser for EXTABLED_SETIONS in Doxygen
Features used: Operators: && AND operator || OR operator ! NOT operator
Definition at line 27 of file condparser.h.
|
private |
Enumerator | |
---|---|
UNKNOWN_OP | |
AND | |
OR | |
NOT |
Definition at line 43 of file condparser.h.
|
private |
Enumerator | |
---|---|
NOTHING | |
DELIMITER | |
VARIABLE | |
UNKNOWN |
Definition at line 36 of file condparser.h.
|
inline |
Definition at line 31 of file condparser.h.
evaluate an operator for given valuess
Definition at line 288 of file condparser.cpp.
|
private |
|
private |
returns the id of the given operator returns -1 if the operator is not recognized
Definition at line 112 of file condparser.cpp.
|
private |
Get next token in the current string expr. Uses the data in m_expr pointed to by m_e to produce m_tokenType and m_token, set m_err in case of an error
Definition at line 129 of file condparser.cpp.
bool CondParser::parse | ( | const char * | fileName, |
int | lineNr, | ||
const char * | expr | ||
) |
Copyright (C) 1997-2015 by Dimitri van Heesch.
Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. See the GNU General Public License for more details.
Documents produced by Doxygen are derivative works derived from the input used in their production; they are not affected by this license.
C++ Expression parser for ENABLED_SECTIONS in Doxygen
Features used: Operators: && AND operator || OR operator ! NOT operator parses and evaluates the given expression.
Definition at line 34 of file condparser.cpp.
|
private |
conditional operators AND and OR
Definition at line 194 of file condparser.cpp.
|
private |
|
private |
parenthesized expression or variable
Definition at line 233 of file condparser.cpp.
|
private |
Definition at line 257 of file condparser.cpp.
|
private |
points to a character in expr
Definition at line 56 of file condparser.h.
|
private |
error state
Definition at line 54 of file condparser.h.
|
private |
holds the expression
Definition at line 55 of file condparser.h.
|
private |
holds the token
Definition at line 58 of file condparser.h.
|
private |
type of the token
Definition at line 59 of file condparser.h.