From c3048d5c1c59f7f10fc794dbc2be29dc2586894d Mon Sep 17 00:00:00 2001 From: Adam Radziszewski <adam.radziszewski@pwr.wroc.pl> Date: Mon, 1 Oct 2012 11:00:59 +0200 Subject: [PATCH] add anninter operator, returning channel names with any annot at the given position --- CMakeLists.txt | 2 +- libwccl/CMakeLists.txt | 1 + libwccl/parser/grammar.g | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 258b43d..f32663e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.0) set(wccl_ver_major "0") set(wccl_ver_minor "2") -set(wccl_ver_patch "0") +set(wccl_ver_patch "1") set(LIBWCCL_VERSION "${wccl_ver_major}.${wccl_ver_minor}.${wccl_ver_patch}") diff --git a/libwccl/CMakeLists.txt b/libwccl/CMakeLists.txt index 60088bc..6c6a9fe 100644 --- a/libwccl/CMakeLists.txt +++ b/libwccl/CMakeLists.txt @@ -67,6 +67,7 @@ SET(libwccl_STAT_SRC ops/functions/strset/lextranslator.cpp ops/functions/strset/tolower.cpp ops/functions/strset/toupper.cpp + ops/functions/strset/anninter.cpp ops/functions/tset/agrfilter.cpp ops/functions/tset/catfilter.cpp ops/functions/tset/getsymbols.cpp diff --git a/libwccl/parser/grammar.g b/libwccl/parser/grammar.g index 688924d..c1dd8f3 100644 --- a/libwccl/parser/grammar.g +++ b/libwccl/parser/grammar.g @@ -55,6 +55,7 @@ header { #include <libwccl/ops/functions/strset/tolower.h> #include <libwccl/ops/functions/strset/getlemmas.h> #include <libwccl/ops/functions/strset/lextranslator.h> + #include <libwccl/ops/functions/strset/anninter.h> #include <libwccl/ops/functions/tset/agrfilter.h> #include <libwccl/ops/functions/tset/catfilter.h> @@ -1052,6 +1053,7 @@ strset_operator [ParsingScope& scope] | ret = strset_condition [scope] | ret = strset_union [scope] | ret = strset_intersection [scope] + | ret = strset_anninter [scope] | ret = strset_lex [scope] // | LPAREN ret = strset_operator [scope] RPAREN @@ -1229,6 +1231,24 @@ strset_intersection } ; +strset_anninter + [ParsingScope& scope] + returns [boost::shared_ptr<Function<StrSet> > op] +{ + boost::shared_ptr<Function<Position> > pos; + boost::shared_ptr<Function<StrSet> > in_strs; +} + : "anninter" + LPAREN + pos = position_operator [scope] + COMMA + in_strs = strset_operator [scope] + RPAREN + { + op.reset(new AnnInter(pos, in_strs)); + } +; + strset_lex [ParsingScope& scope] returns [boost::shared_ptr<Function<StrSet> > op] -- GitLab