summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {