diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-31 01:08:42 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-31 01:08:42 +0000 |
commit | 2af5a445f3905c69c42be5c758c52a2f21b17446 (patch) | |
tree | b970b770210046d6a1b41d3385084dd7d4d06961 /decoder/cfg.h | |
parent | 61be4c3048df90d7decdbe4caf91d7ed80433a3f (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-x | decoder/cfg.h | 10 |
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) { |