diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y
index 08f8414142f58123dd63c9cf7c991d96c6bff5ff..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;
sdb_object_deref(SDB_OBJ($3)); $3 = NULL;
}
|
- ':' IDENTIFIER
+ '.' IDENTIFIER
{
int field = sdb_store_parse_field_name($2);
free($2); $2 = NULL;
}
;
-op:
+cmp:
CMP_EQUAL { $$ = "="; }
|
CMP_NEQUAL { $$ = "!="; }