From 04590b81a7ced69de6906616ce002d2608e77e90 Mon Sep 17 00:00:00 2001 From: graehl Date: Fri, 27 Aug 2010 19:26:31 +0000 Subject: compiles git-svn-id: https://ws10smt.googlecode.com/svn/trunk@626 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/cfg.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'decoder/cfg.h') diff --git a/decoder/cfg.h b/decoder/cfg.h index 9be0926d..79ae6f33 100755 --- a/decoder/cfg.h +++ b/decoder/cfg.h @@ -62,6 +62,28 @@ struct CFG { void print_nt_name(std::ostream &o,NTHandle n) const { o << nts[n].from << n; } + std::string nt_name(NTHandle n) const { + std::ostringstream o; + print_nt_name(o,n); + return o.str(); + } + void print_rhs_name(std::ostream &o,WordID w) const { + if (w<=0) print_nt_name(o,-w); + else o< BinRhs; -- cgit v1.2.3