summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 613d331)
raw | patch | inline | side by side (parent: 613d331)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 8 Oct 2014 20:29:57 +0000 (22:29 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 8 Oct 2014 20:29:57 +0000 (22:29 +0200) |
That's a better name ;-)
src/frontend/grammar.y | patch | blob | history |
diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y
index 9cf98eef406c2b5ecb54096706fd4abba8849050..3a78d2490960a4f20cbe130f34e133852c08036f 100644 (file)
--- a/src/frontend/grammar.y
+++ b/src/frontend/grammar.y
%type <expr> expression
-%type <sstr> op
+%type <sstr> cmp
%type <data> data
interval interval_elem
;
/*
- * <object_type>.<object_attr> <op> <value>
+ * <object_type>.<object_attr> <cmp> <value>
*
* Parse matchers comparing object attributes with a value.
*/
compare_matcher:
- '.' IDENTIFIER op expression
+ '.' IDENTIFIER cmp expression
{
$$ = sdb_store_matcher_parse_field_cmp($2, $3, $4);
free($2); $2 = NULL;
sdb_object_deref(SDB_OBJ($4));
}
|
- IDENTIFIER op expression
+ IDENTIFIER cmp expression
{
$$ = sdb_store_matcher_parse_cmp($1, NULL, $2, $3);
free($1); $1 = NULL;
sdb_object_deref(SDB_OBJ($3));
}
|
- IDENTIFIER '[' IDENTIFIER ']' op expression
+ IDENTIFIER '[' IDENTIFIER ']' cmp expression
{
$$ = sdb_store_matcher_parse_cmp($1, $3, $5, $6);
free($1); $1 = NULL;
}
;
-op:
+cmp:
CMP_EQUAL { $$ = "="; }
|
CMP_NEQUAL { $$ = "!="; }