diff options
author | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2013-12-16 23:49:58 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2013-12-16 23:49:58 -0500 |
commit | 9d5fce4f9a59ea6f45a2d094361bacc07f4148e7 (patch) | |
tree | 0b0694b2af6e3b6809ad30ac952fe1210ce958fb /decoder/grammar.cc | |
parent | 09b71909b0ecc2d69dfdfb81f535db2519cd5642 (diff) |
better parsing errors, thx to nschneid, also increase limits on number of features
Diffstat (limited to 'decoder/grammar.cc')
-rw-r--r-- | decoder/grammar.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder/grammar.cc b/decoder/grammar.cc index 160d00e6..439e448d 100644 --- a/decoder/grammar.cc +++ b/decoder/grammar.cc @@ -121,11 +121,11 @@ static void AddRuleHelper(const TRulePtr& new_rule, const unsigned int ctf_level void TextGrammar::ReadFromFile(const string& filename) { ReadFile in(filename); - ReadFromStream(in.stream()); + RuleLexer::ReadRules(in.stream(), &AddRuleHelper, filename, this); } void TextGrammar::ReadFromStream(istream* in) { - RuleLexer::ReadRules(in, &AddRuleHelper, this); + RuleLexer::ReadRules(in, &AddRuleHelper, "UNKNOWN", this); } bool TextGrammar::HasRuleForSpan(int /* i */, int /* j */, int distance) const { |