From 9efac7dc163ee573072fe1cdf64fb0dceb655982 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sun, 26 Sep 2010 14:09:57 +0200 Subject: new 'lenght' command for script language --- varparser.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'varparser.h') 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); -- cgit v1.2.3