bool generate_json (parse_tree const& in, std::basic_ostream<Char>& out) { json_printer<std::basic_ostream<Char> > print(out, in.annotations()); print(in.ast()); return true; }
bool generate_mss_dot( parse_tree const& in, std::basic_ostream<Char>& out) { mss_dot_printer<std::basic_ostream<Char> > printer(out, in.annotations()); printer.print(in.ast()); return true; }
bool generate_json (parse_tree const& in, std::basic_string<Char>& out) { std::basic_stringstream<Char> oss; json_printer<std::basic_stringstream<Char> > print(oss, in.annotations()); print(in.ast()); out = oss.str(); return true; }
static type call (utree const& ut, parse_tree<Tag> const& pt) { using fusion::at_c; switch (ut.which()) { case utree_type::reference_type: return call(ut.deref()); case utree_type::range_type: case utree_type::list_type: return at_c<1>(pt.annotations()[ut.tag()]); default: return -1; } }
source_location get_location(utree const& ut) { return tree.annotations()[ut.tag()].first; }
int get_node_type(utree const& ut) { return( tree.annotations(ut.tag()).second ); }