Skip to content
Snippets Groups Projects
Commit 5f7bbb41 authored by ilor's avatar ilor
Browse files

token condition match (L0 predicate wrappers) in grammar

parent fbc84ed5
Branches
No related merge requests found
......@@ -79,6 +79,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/conditions/tokencondition.h>
#include <libwccl/ops/match/actions/markmatch.h>
#include <libwccl/ops/match/actions/unmarkmatch.h>
......@@ -1904,8 +1905,23 @@ match_cond_all
returns [boost::shared_ptr<const MatchCondition> ret]
: ret = match_cond_optional [tagset, vars]
| ret = match_cond_repeate [tagset, vars]
| ret = match_cond_token [tagset, vars]
;
// Match condition - token (wraps a L0 predicate)
// Returns boost::shared_ptr<const MatchCondition>
match_cond_token
[const Corpus2::Tagset& tagset, Variables& vars]
returns [boost::shared_ptr<const TokenCondition> ret]
{
boost::shared_ptr<Function<Bool> > bool_op;
}
: bool_op = bool_operator [tagset, vars] {
ret = boost::make_shared<TokenCondition>(bool_op);
}
;
// Match condition - optional
// Returns boost::shared_ptr<OptionalMatch>
match_cond_optional
......
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