From 9139f1df4cda80b91ab68e5de27e85eaa4c54682 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 31 Jul 2006 08:07:12 +0000 Subject: I still can't get the pymake file to auto-make the bison and flex .c files, but besides that everything is looking great. There's only one thing left to parse and interpret before we can try actually building something. --- src/rule.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/rule.h (limited to 'src/rule.h') diff --git a/src/rule.h b/src/rule.h new file mode 100644 index 0000000..64cdc9d --- /dev/null +++ b/src/rule.h @@ -0,0 +1,49 @@ +#ifndef RULE_H +#define RULE_H + +#include +#include +#include "staticstring.h" + +class Rule +{ +public: + enum Matches + { + matchOne, + matchAll + }; + + enum Perform + { + perfCommand + }; + +public: + Rule( const char *sName ); + virtual ~Rule(); + + const char *getName() + { + return sName; + } + + void debug(); + + void setProduces( const char *sProduces ); + void setMatches( Matches how, const char *sWhat ); + void setPerforms( Perform pwhat, const char *sPerfCmd ); + +private: + StaticString sName; + StaticString sProduces; + + Matches mHow; + StaticString sWhat; + regex_t rWhat; + + Perform pHow; + StaticString sPerfCmd; +}; + +#endif -- cgit v1.2.3