From f1916c39b820b7d10d1ae7d7447675c4224d8197 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 24 Aug 2014 17:26:05 +0100 Subject: fixes --- fast/parse.hh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'fast/parse.hh') diff --git a/fast/parse.hh b/fast/parse.hh index 9fbcdea..33ea9ce 100644 --- a/fast/parse.hh +++ b/fast/parse.hh @@ -6,6 +6,8 @@ #include #include "grammar.hh" +#include "util.hh" +#include "weaver.hh" using namespace std; @@ -74,9 +76,10 @@ struct Chart string h(ChartItem* item, Span s) { ostringstream ss; - ss << item->rule->lhs->symbol; + item->rule->lhs->symbol(); ss << s.first; ss << s.second; + return ss.str(); } @@ -92,9 +95,11 @@ struct Chart }; -void init(vector const& in, size_t n, Chart& active, Chart& passive, G::Grammar const& g) +void +init(vector const& in, size_t n, Chart& active, Chart& passive, G::Grammar const& g) { - for (auto rule: g.flat) { + for (auto rule: g.rules) { + cout << *rule << endl; } } -- cgit v1.2.3