X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=parser.h;fp=parser.h;h=0000000000000000000000000000000000000000;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=e4df3285d03c58b67ce0fbda162fdd2e9162fd25;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git diff --git a/parser.h b/parser.h deleted file mode 100644 index e4df328..0000000 --- a/parser.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef PARSER_H -#define PARSER_H - -#include -#include - -enum ErrorLevel {NoError,Warning,Aborted}; - -class Command; -class TreeItem; - -class Parser -{ -public: - Parser(); - void parseAtom (QString input); - QString getAtom(); - QString getCommand(); - QStringList getParameters(); - int parCount(); - QString errorMessage(); - QString errorDescription(); - ErrorLevel errorLevel(); - void setError (ErrorLevel level,const QString &description); - void resetError(); - bool checkParameters(TreeItem *selti); - bool checkParCount (const int &index); - bool checkParIsInt (const int &index); - bool checkParIsDouble (const int &index); - int parInt (bool &,const uint &index); - QString parString(bool &ok,const int &index); - bool parBool (bool &ok, const int &index); - QColor parColor (bool &ok, const int &index); - double parDouble (bool &ok, const int &index); - - void setScript (const QString &); - QString getScript(); - void execute(); - bool next(); - - QStringList getCommands(); - -protected: - QStringList findParameters(const QString &s); - bool nextParenthesisContents( - const QString &s, - int &leftParenthesis, - int &rightParenthesis, - QString &contents); - -private: - void initParser(); - void initAtom(); - - QString input; - QString atom; - QString com; - QStringList paramList; - int current; - QString script; - - QString errMessage; - QString errDescription; - ErrorLevel errLevel; -}; - -#endif