diff --git a/libwccl/parser/grammar.g b/libwccl/parser/grammar.g index 6047b7240b85420629b93e42a0f9d43c352b2e03..505b988f70d875a0e2a5ff112750dad6988c1ee6 100644 --- a/libwccl/parser/grammar.g +++ b/libwccl/parser/grammar.g @@ -79,7 +79,7 @@ private: const UnicodeString token_ref_to_ustring(antlr::RefToken& rstr) const { return UnicodeString::fromUTF8(((antlr::Token*)rstr)->getText()).unescape(); } - // + /* const UnicodeString str_token_ref_to_ustring(antlr::RefToken& rstr) const { UnicodeString ret_ustr, ustr = token_ref_to_ustring(rstr); @@ -91,6 +91,7 @@ private: return ret_ustr; } + */ // const std::string str_token_rem_grav(antlr::RefToken& rstr) const { size_t len = 0; @@ -141,6 +142,7 @@ parse_string_operator : op = string_operators [tagset, *res->variables.get()] { res->op = op; } + EOF ; // ---------------------------------------------------------------------------- @@ -156,6 +158,7 @@ parse_predicates : op = logical_predicates [tagset, *res->variables.get()] { res->op = op; } + EOF ; // ---------------------------------------------------------------------------- @@ -171,6 +174,7 @@ parse_sym_set_operator : op = sym_set_operators [tagset, *res->variables.get()] { res->op = op; } + EOF ; // ---------------------------------------------------------------------------- @@ -186,6 +190,7 @@ parse_position_operator : op = position_operators [tagset, *res->variables.get()] { res->op = op; } + EOF ; /////////////////////////////////////////////////////////////////////////////// @@ -203,14 +208,14 @@ str_set_literal s_set.reset(new Wccl::StrSet()); } : s0: STRING { - s_set->insert(str_token_ref_to_ustring(s0)); + s_set->insert(token_ref_to_ustring(s0)); } | LBRACKET ( s1: STRING { - s_set->insert(str_token_ref_to_ustring(s1)); + s_set->insert(token_ref_to_ustring(s1)); } ( COMMA s2: STRING { - s_set->insert(str_token_ref_to_ustring(s2)); + s_set->insert(token_ref_to_ustring(s2)); } )* )? @@ -368,6 +373,7 @@ position_variable } ; +// ---------------------------------------------------------------------------- // realtive position relpos [const Corpus2::Tagset& tagset, Wccl::Variables& vars] @@ -930,7 +936,7 @@ lpred_regex boost::shared_ptr<Wccl::Function<Wccl::StrSet> > expr; } : "regex" LPAREN expr = string_operators [tagset, vars] COMMA reg: STRING RPAREN { - op.reset(new Wccl::Regex(expr, str_token_ref_to_ustring(reg))); + op.reset(new Wccl::Regex(expr, token_ref_to_ustring(reg))); } ;