diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-10-30T16·48+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-10-30T16·48+0000 |
commit | 403cb9327f5c298cb6a85a87241962df4a90857b (patch) | |
tree | 7845c52eef1ce3289cd8a32e083542dcdfceecc8 /src/fix-ng/eval.hh | |
parent | 9f8f39aa3cdb54532a85e41f14985fc6a530fb36 (diff) |
* Factor out evaluation into a separate file.
Diffstat (limited to 'src/fix-ng/eval.hh')
-rw-r--r-- | src/fix-ng/eval.hh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/fix-ng/eval.hh b/src/fix-ng/eval.hh new file mode 100644 index 000000000000..5fcb648a7403 --- /dev/null +++ b/src/fix-ng/eval.hh @@ -0,0 +1,31 @@ +#ifndef __EVAL_H +#define __EVAL_H + +#include <map> + +#include "fix-expr.hh" + + +typedef map<Expr, Expr> NormalForms; +//typedef map<Path, PathSet> PkgPaths; +//typedef map<Path, Hash> PkgHashes; + +struct EvalState +{ + NormalForms normalForms; + // PkgPaths pkgPaths; + // PkgHashes pkgHashes; /* normalised package hashes */ + Expr blackHole; + + EvalState(); +}; + + +/* Evaluate an expression to normal form. */ +Expr evalExpr(EvalState & state, Expr e); + +/* Evaluate an expression read from the given file to normal form. */ +Expr evalFile(EvalState & state, const Path & path); + + +#endif /* !__EVAL_H */ |