X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Ffrontend%2Fgrammar.y;h=3a78d2490960a4f20cbe130f34e133852c08036f;hp=9cf98eef406c2b5ecb54096706fd4abba8849050;hb=2725e5e2024c134f05fd73baccda696572a24335;hpb=613d33154547150d227282dd1fe7ea382255e67c diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y index 9cf98ee..3a78d24 100644 --- a/src/frontend/grammar.y +++ b/src/frontend/grammar.y @@ -132,7 +132,7 @@ sdb_fe_yyerror(YYLTYPE *lval, sdb_fe_yyscan_t scanner, const char *msg); %type expression -%type op +%type cmp %type data interval interval_elem @@ -393,26 +393,26 @@ matcher: ; /* - * . + * . * * 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; @@ -495,7 +495,7 @@ expression: } ; -op: +cmp: CMP_EQUAL { $$ = "="; } | CMP_NEQUAL { $$ = "!="; }