summaryrefslogtreecommitdiff
path: root/fast/parse.hh
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-08-24 17:26:05 +0100
committerPatrick Simianer <p@simianer.de>2014-08-24 17:26:05 +0100
commitf1916c39b820b7d10d1ae7d7447675c4224d8197 (patch)
tree7d3673d7784e7b3adbb6ca5b86e31058176bd376 /fast/parse.hh
parentcef65063cec641a93973b38a48e100fdd115db44 (diff)
fixes
Diffstat (limited to 'fast/parse.hh')
-rw-r--r--fast/parse.hh11
1 files changed, 8 insertions, 3 deletions
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 <unordered_map>
#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<G::T> const& in, size_t n, Chart& active, Chart& passive, G::Grammar const& g)
+void
+init(vector<symbol_t> 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;
}
}