summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-16 19:11:03 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-16 19:11:03 +0000
commitf5cb1bc791728f9de1e2c8df66e88d4a3e665aa8 (patch)
tree24274c7b929ef7e5a04e288d9344e82df7fea3ca /decoder
parent4bfe2e50e5b9c8dabc1ae6f63d5cdaa3ccd4c6a0 (diff)
fixed
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@563 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder')
-rwxr-xr-xdecoder/cfg.cc35
1 files changed, 17 insertions, 18 deletions
diff --git a/decoder/cfg.cc b/decoder/cfg.cc
index b0d4eab6..4d5bf801 100755
--- a/decoder/cfg.cc
+++ b/decoder/cfg.cc
@@ -214,6 +214,23 @@ WordID BinName(RHS const& b,CFG::NTs const& N,CFG::NTs const& M)
}
template <class Rhs>
+struct null_for;
+
+typedef CFG::BinRhs BinRhs;
+
+template <>
+struct null_for<BinRhs> {
+ static BinRhs null;
+};
+BinRhs null_for<BinRhs>::null(std::numeric_limits<int>::min(),std::numeric_limits<int>::min());
+
+template <>
+struct null_for<RHS> {
+ static RHS null;
+};
+RHS null_for<RHS>::null(1,std::numeric_limits<int>::min());
+
+template <class Rhs>
struct add_virtual_rules {
typedef CFG::RuleHandle RuleHandle;
typedef CFG::NTHandle NTHandle;
@@ -343,24 +360,6 @@ struct add_virtual_rules {
}
};
-
-template <class Rhs>
-struct null_for;
-
-typedef CFG::BinRhs BinRhs;
-
-template <>
-struct null_for<BinRhs> {
- static BinRhs null;
-};
-BinRhs null_for<BinRhs>::null(std::numeric_limits<int>::min(),std::numeric_limits<int>::min());
-
-template <>
-struct null_for<RHS> {
- static RHS null;
-};
-RHS null_for<RHS>::null(1,std::numeric_limits<int>::min());
-
}//ns
void CFG::BinarizeSplit(CFGBinarize const& b) {