diff --git a/libwccl/ops/parsedexpression.h b/libwccl/ops/parsedexpression.h index d8e1526b2c41511e0088292683ad07dd9614f362..b3b007a63ae124f7b17cbb3a9b57b4fc01faf3a5 100644 --- a/libwccl/ops/parsedexpression.h +++ b/libwccl/ops/parsedexpression.h @@ -138,6 +138,19 @@ public: * @see clone_ptr - a version that keeps values of the variables. */ boost::shared_ptr<ParsedExpression> clone_clean_ptr() const; + + /** + * Dup all variables to error stream. + */ + void dumpvariables(const Corpus2::Tagset& tagset) + { + typedef std::pair<std::string, boost::shared_ptr<Wccl::Value> > v_t; + + foreach (const v_t& v, variables_->get_all<Wccl::Value>()) { + std::cerr << v.second->make_var_repr(v.first) << "=" + << v.second->to_string(tagset) << "\n"; + } + } protected: explicit ParsedExpression(const Variables& variables);