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

Added Constant<Match> rule

parent aed34fdf
No related merge requests found
......@@ -78,6 +78,7 @@ header {
#include <libwccl/ops/match/conditions/optionalmatch.h>
#include <libwccl/ops/match/conditions/repeatedmatch.h>
#include <libwccl/ops/match/conditions/conjconditions.h>
#include <libwccl/ops/match/actions/markmatch.h>
// Unicode String
#include <unicode/uniset.h>
......@@ -417,6 +418,18 @@ match_value
}
;
// Constant match value
// Returns boost::shared_ptr<Constant<Match> >
match_value_const
returns [boost::shared_ptr<Constant<Match> > val]
{
boost::shared_ptr<Match> m;
}
: m = match_value {
val.reset(new Constant<Match>(*m));
}
;
// ----------------------------------------------------------------------------
// Value used into match operator such as TOK[position] and ANN[position, name]
// Returns boost::shared_ptr<MatchData>
......@@ -434,7 +447,7 @@ token_match_value
{
boost::shared_ptr<Position> p;
}
: "TOK"LBRACKET p = position_literal RBRACKET {
: "TOK" LBRACKET p = position_literal RBRACKET {
val.reset(new TokenMatch(*p));
}
;
......@@ -1927,10 +1940,10 @@ match_action
;
// Match mark action
// Returns ???
// Returns
match_mark_action
[const Corpus2::Tagset& tagset, Variables& vars]
returns [boost::shared_ptr<MatchAction> m_act]
returns [boost::shared_ptr<MarkMatch> m_act]
: "mark" LPAREN /* TODO */ RPAREN
;
......
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