diff options
Diffstat (limited to 'varparser.h')
-rw-r--r-- | varparser.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/varparser.h b/varparser.h index 3a018bc..0a9fc11 100644 --- a/varparser.h +++ b/varparser.h @@ -40,6 +40,15 @@ typedef enum class cVarParser { + typedef enum + { + composed=0, + condition, + shellcmd, + connectcmd, + lengthcmd + } exprType; + public: string varName; string condEqLeft; @@ -53,18 +62,21 @@ class cVarParser string cmdArgs; string connectAddr; - int connectPort; + int connectPort; + exprType type; - cVarParser() : cmd(NULL), connectPort(-1) {} + cVarParser() : cmd(NULL), connectPort(-1), type(composed) {} bool Parse(const string& input); bool ParseExp(const string& input); bool IsCondExpr(); bool IsShellCmd(); bool IsConnectCmd(); + bool IsLengthCmd(); private: bool ParseAssign(const string& input); bool ParseShellCmd(const string& input); bool ParseConnectCmd(const string& input); + bool ParseLengthCmd(const string& input); bool ParseCondExp(const string& input); bool ParseEquality(const string& input); bool ParseVar(const string& input); |