From c668bd808b2123486bd64bdcaa992f7a8fa2da52 Mon Sep 17 00:00:00 2001 From: "trevor.cohn" Date: Wed, 4 Aug 2010 11:19:47 +0000 Subject: allow for wider set of NT strings git-svn-id: https://ws10smt.googlecode.com/svn/trunk@477 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/rule_lexer.l | 2 +- extools/sg_lexer.l | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/decoder/rule_lexer.l b/decoder/rule_lexer.l index 0216b119..63eb7562 100644 --- a/decoder/rule_lexer.l +++ b/decoder/rule_lexer.l @@ -110,7 +110,7 @@ void check_and_update_ctf_stack(const TRulePtr& rp) { %} REAL [\-+]?[0-9]+(\.[0-9]*([eE][-+]*[0-9]+)?)?|inf|[\-+]inf -NT [\-#$A-Z_:=.",\\][\-#$".A-Z+/=_0-9!:@\\]* +NT [^\t \[\],]+ %x LHS_END SRC TRG FEATS FEATVAL ALIGNS %% diff --git a/extools/sg_lexer.l b/extools/sg_lexer.l index 9051ba51..168b835a 100644 --- a/extools/sg_lexer.l +++ b/extools/sg_lexer.l @@ -79,7 +79,7 @@ static void sglex_reset() { %} REAL [\-+]?[0-9]+(\.[0-9]*([eE][-+]*[0-9]+)?)?|inf|[\-+]inf -NT [\-#$A-Z_:=.",\\][\-#$".A-Z+/=_0-9!:@\\]* +NT [^\t \[\],]+ ALIGN [0-9]+-[0-9]+ %x LHS_END SRC TRG FEATS FEATVAL ALIGNS @@ -191,6 +191,8 @@ ALIGN [0-9]+-[0-9]+ } \|\|\| { + //std::cerr << " trg_size: " << sglex_trg_rhs_size << std::endl; + //std::cerr << " trg_arity: " << sglex_trg_arity << std::endl; assert(sglex_trg_rhs_size > 0); cur_trg_rhs.resize(sglex_trg_rhs_size); for (int i = 0; i < sglex_trg_rhs_size; ++i) -- cgit v1.2.3