summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2014-04-01 18:49:22 -0400
committerChris Dyer <redpony@gmail.com>2014-04-01 18:49:22 -0400
commitd75c78040cb49e69e4702a2c35e997315a57150b (patch)
tree468307246fb3a4ce01dd98f0a892a64d9fd841d3 /decoder
parent1fb851b365765b01dbbedaf6699e7ff4c2b41b4a (diff)
deal with multiple grammars in t2s
Diffstat (limited to 'decoder')
-rw-r--r--decoder/tree_fragment.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder/tree_fragment.h b/decoder/tree_fragment.h
index ceb7fa60..f1c4c106 100644
--- a/decoder/tree_fragment.h
+++ b/decoder/tree_fragment.h
@@ -139,6 +139,10 @@ class BreadthFirstIterator : public std::iterator<std::forward_iterator_tag, uns
q_.pop_back();
return *this;
}
+ unsigned child_node() const {
+ assert(IsRHS(sym));
+ return q_.back().node;
+ }
BreadthFirstIterator remainder() const {
assert(IsRHS(sym));
return BreadthFirstIterator(tf_, q_.back());