diff options
| author | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-08-06 22:37:06 +0000 |
|---|---|---|
| committer | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-08-06 22:37:06 +0000 |
| commit | 6d40002093a5d8e665d4f310ea028d22e93e88cb (patch) | |
| tree | 6a537e4ee4625df1b57a651357e913b8ff71a996 /util/epist/parser.hh | |
| parent | 00391787e32111fa5c9de606b5edf595846e7513 (diff) | |
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.
Diffstat (limited to 'util/epist/parser.hh')
| -rw-r--r-- | util/epist/parser.hh | 33 |
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; +}; |
