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

Match variants for oneof() and longest() operators (not complete)

parent e23085e3
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,7 @@ header {
#include <libwccl/ops/match/conditions/matchtext.h>
#include <libwccl/ops/match/conditions/conjconditions.h>
#include <libwccl/ops/match/conditions/tokencondition.h>
#include <libwccl/ops/match/conditions/oneof.h>
#include <libwccl/ops/match/actions/markmatch.h>
#include <libwccl/ops/match/actions/unmarkmatch.h>
#include <libwccl/ops/functions/match/submatch.h>
......@@ -1992,6 +1993,28 @@ match_condition_in
)*
;
// Match variants variant(v1), variant(v2), ...
// Retutns boost::shared_ptr<std::vector<ConjConditions> >
match_variants
[const Corpus2::Tagset& tagset, Variables& vars]
returns [boost::shared_ptr<std::vector<ConjConditions> > variants]
{
variants.reset(new std::vector<ConjConditions>());
boost::shared_ptr<ConjConditions> variant;
}
: "variant" LPAREN variant = match_condition [tagset, vars] RPAREN {
// TODO
// variants->push_back(variant);
}
(
COMMA "variant" LPAREN variant = match_condition [tagset, vars] RPAREN {
// TODO
// variants->push_back(variant);
}
)*
;
// One of the match condition
// Returns boost::shared_ptr<const MatchCondition>
match_cond_all
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment