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

Added text() operator to the grammar

parent 7a8c9289
Branches
No related merge requests found
......@@ -82,6 +82,7 @@ header {
#include <libwccl/ops/match/conditions/optionalmatch.h>
#include <libwccl/ops/match/conditions/repeatedmatch.h>
#include <libwccl/ops/match/conditions/isannotatedas.h>
#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/actions/markmatch.h>
......@@ -2000,6 +2001,7 @@ match_cond_all
| ret = match_cond_repeate [tagset, vars]
| ret = match_cond_token [tagset, vars]
| ret = match_cond_is
| ret = match_cond_text
;
// Match condition - token (wraps a L0 predicate)
......@@ -2051,6 +2053,15 @@ match_cond_is
}
;
// Match condition - text(text)
// Returns boost::shared_ptr<MatchText>
match_cond_text
returns [boost::shared_ptr<MatchText> mtch]
: "text" LPAREN txt: STRING RPAREN {
mtch.reset(new MatchText(token_ref_to_ustring(txt)));
}
;
// ----------------------------------------------------------------------------
// Match actions. Match action can be mark or unmark
......
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