summaryrefslogtreecommitdiff
path: root/decoder/cfg.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-31 01:08:42 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-31 01:08:42 +0000
commit2af5a445f3905c69c42be5c758c52a2f21b17446 (patch)
treeb970b770210046d6a1b41d3385084dd7d4d06961 /decoder/cfg.h
parent61be4c3048df90d7decdbe4caf91d7ed80433a3f (diff)
l2r bugfixes
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@634 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cfg.h')
-rwxr-xr-xdecoder/cfg.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/decoder/cfg.h b/decoder/cfg.h
index 95cb5fd7..8cb29bb9 100755
--- a/decoder/cfg.h
+++ b/decoder/cfg.h
@@ -77,8 +77,16 @@ struct CFG {
if (w<=0) return nt_name(-w);
else return TD::Convert(w);
}
+ static void static_print_nt_name(std::ostream &o,NTHandle n) {
+ o<<'['<<n<<']';
+ }
+ static std::string static_nt_name(NTHandle w) {
+ std::ostringstream o;
+ static_print_nt_name(o,w);
+ return o.str();
+ }
static void static_print_rhs_name(std::ostream &o,WordID w) {
- if (w<=0) o<<'['<<-w<<']';
+ if (w<=0) static_print_nt_name(o,-w);
else o<<TD::Convert(w);
}
static std::string static_rhs_name(WordID w) {