diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-07-31 08:07:12 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-07-31 08:07:12 +0000 |
commit | 9139f1df4cda80b91ab68e5de27e85eaa4c54682 (patch) | |
tree | 87fadb2618ee8228f7184aa14bfa2b21741e3f49 /src/rule.h | |
parent | 113fc467a7170a8a564049c64d1036dd10e6abac (diff) | |
download | build-9139f1df4cda80b91ab68e5de27e85eaa4c54682.tar.gz build-9139f1df4cda80b91ab68e5de27e85eaa4c54682.tar.bz2 build-9139f1df4cda80b91ab68e5de27e85eaa4c54682.tar.xz build-9139f1df4cda80b91ab68e5de27e85eaa4c54682.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/rule.h | 49 |
1 files changed, 49 insertions, 0 deletions
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 @@ | |||
1 | #ifndef RULE_H | ||
2 | #define RULE_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | #include <regex.h> | ||
6 | #include "staticstring.h" | ||
7 | |||
8 | class Rule | ||
9 | { | ||
10 | public: | ||
11 | enum Matches | ||
12 | { | ||
13 | matchOne, | ||
14 | matchAll | ||
15 | }; | ||
16 | |||
17 | enum Perform | ||
18 | { | ||
19 | perfCommand | ||
20 | }; | ||
21 | |||
22 | public: | ||
23 | Rule( const char *sName ); | ||
24 | virtual ~Rule(); | ||
25 | |||
26 | const char *getName() | ||
27 | { | ||
28 | return sName; | ||
29 | } | ||
30 | |||
31 | void debug(); | ||
32 | |||
33 | void setProduces( const char *sProduces ); | ||
34 | void setMatches( Matches how, const char *sWhat ); | ||
35 | void setPerforms( Perform pwhat, const char *sPerfCmd ); | ||
36 | |||
37 | private: | ||
38 | StaticString sName; | ||
39 | StaticString sProduces; | ||
40 | |||
41 | Matches mHow; | ||
42 | StaticString sWhat; | ||
43 | regex_t rWhat; | ||
44 | |||
45 | Perform pHow; | ||
46 | StaticString sPerfCmd; | ||
47 | }; | ||
48 | |||
49 | #endif | ||