summaryrefslogtreecommitdiff
path: root/util/epist/parser.hh
diff options
context:
space:
mode:
Diffstat (limited to 'util/epist/parser.hh')
-rw-r--r--util/epist/parser.hh33
1 files changed, 33 insertions, 0 deletions
diff --git a/util/epist/parser.hh b/util/epist/parser.hh
new file mode 100644
index 00000000..148649bd
--- /dev/null
+++ b/util/epist/parser.hh
@@ -0,0 +1,33 @@
+#include <string>
+#include "actions.hh"
+#include "keytree.hh"
+
+class parser {
+public:
+ parser(keytree *);
+ ~parser();
+
+ void parse(std::string);
+
+ void setKey(std::string key)
+ { _key = key; }
+
+ void setArgument(std::string arg)
+ { _arg = arg; }
+
+ void setAction(std::string);
+ void addModifier(std::string);
+ void endAction();
+ void startChain();
+ void setChainBinding();
+ void endChain();
+
+private:
+ void reset();
+
+ keytree *_kt;
+ unsigned int _mask;
+ Action::ActionType _action;
+ std::string _key;
+ std::string _arg;
+};