Skip to content
Snippets Groups Projects
Commit 13ef1f7e authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

Added mark_action

parent 37faf56d
No related merge requests found
......@@ -1944,7 +1944,23 @@ match_action
match_mark_action
[const Corpus2::Tagset& tagset, Variables& vars]
returns [boost::shared_ptr<MarkMatch> m_act]
: "mark" LPAREN /* TODO */ RPAREN
{
boost::shared_ptr<Function<Match> > match_to;
boost::shared_ptr<Function<Match> > match_from;
}
: "mark" LPAREN
match_from = match_fit[tagset, vars] COMMA
match_to = match_fit[tagset, vars] COMMA
annotation_name : STRING
RPAREN {
m_act.reset(
new MarkMatch(
match_from,
match_to,
((antlr::Token*)annotation_name)->getText()
)
);
}
;
// Match unmark action
......@@ -1977,6 +1993,18 @@ match_action_comma_sep
)*
;
// Function<Match> is wrapper for Constant<Match> and Function<Match>
// Returns boost::shared_ptr<Function<Match> >
match_fit
[const Corpus2::Tagset& tagset, Variables& vars]
returns [boost::shared_ptr<Function<Match> > ret]
{
//
}
: ret = match_vector_variable [vars]
| ret = match_value_const
;
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// ANTLR LEXER
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment