summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2725e5e)
raw | patch | inline | side by side (parent: 2725e5e)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 9 Oct 2014 06:57:07 +0000 (08:57 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 9 Oct 2014 06:57:07 +0000 (08:57 +0200) |
src/frontend/grammar.y | patch | blob | history | |
t/unit/frontend/parser_test.c | patch | blob | history |
diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y
index 3a78d2490960a4f20cbe130f34e133852c08036f..93616ac07caa9bf7c9419577e89a559b3f6e38dd 100644 (file)
--- a/src/frontend/grammar.y
+++ b/src/frontend/grammar.y
sdb_object_deref(SDB_OBJ($3)); $3 = NULL;
}
|
+ expression CONCAT expression
+ {
+ $$ = sdb_store_expr_create(SDB_DATA_CONCAT, $1, $3);
+ sdb_object_deref(SDB_OBJ($1)); $1 = NULL;
+ sdb_object_deref(SDB_OBJ($3)); $3 = NULL;
+ }
+ |
'.' IDENTIFIER
{
int field = sdb_store_parse_field_name($2);
index 7560a5fe9af7a89c177559d8fd7e54fdb36d5d5c..0c7b30448c41d2231060355abc4381b4b3ec8026 100644 (file)
{ "LOOKUP hosts MATCHING "
"attribute[foo] <= "
"12. + .3", -1, 1, CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "attribute[foo] <= "
+ "'f' || 'oo'", -1, 1, CONNECTION_LOOKUP },
{ "LOOKUP hosts MATCHING "
"attribute[foo] >= "
".4", -1, 1, CONNECTION_LOOKUP },
{ "LOOKUP foo MATCHING "
"host = 'host' FILTER "
"host = 'host'", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "attribute[foo] <= "
+ "f || 'oo'", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "attribute[foo] <= "
+ "'f' || oo", -1, -1, 0 },
};
size_t i;