From 6d40002093a5d8e665d4f310ea028d22e93e88cb Mon Sep 17 00:00:00 2001 From: Scott Moynes Date: Tue, 6 Aug 2002 22:37:06 +0000 Subject: Big fat merge for epist. This adds a config parser, chaining, and a tonne of other stuff. Still need to fix up build system for the lex and yacc stuff. --- util/epist/parser.hh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 util/epist/parser.hh (limited to 'util/epist/parser.hh') 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 +#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; +}; -- cgit v1.2.3