X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffrontend%2Fgrammar.y;fp=src%2Ffrontend%2Fgrammar.y;h=2e5274469057b12ac195997982e4018df727268e;hb=4065234b3744f0472ce33e4c7fda5bb8cdd1d2e3;hp=ab9345e22c80272b6cbd4b84b0fd7ce4472fda87;hpb=9c8fb23c936d6343e074bc07e985edbbf34cadc1;p=sysdb.git diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y index ab9345e..2e52744 100644 --- a/src/frontend/grammar.y +++ b/src/frontend/grammar.y @@ -323,13 +323,11 @@ list_statement: * Returns detailed information about matching condition. */ lookup_statement: - LOOKUP HOSTS_T matching_clause filter_clause + LOOKUP object_type_plural matching_clause filter_clause { - /* TODO: support other types as well */ - $$ = SDB_CONN_NODE(sdb_object_create_dT(/* name = */ NULL, conn_lookup_t, conn_lookup_destroy)); - CONN_LOOKUP($$)->type = SDB_HOST; + CONN_LOOKUP($$)->type = $2; CONN_LOOKUP($$)->matcher = CONN_MATCHER($3); CONN_LOOKUP($$)->filter = CONN_MATCHER($4); $$->cmd = CONNECTION_LOOKUP; @@ -519,8 +517,9 @@ expression: | HOST_T { - /* TODO: this only works as long as queries - * are limited to hosts */ + /* XXX: this doesn't work correctly when not + * querying hosts => use . instead + * and let the analyzer verify */ $$ = sdb_store_expr_fieldvalue(SDB_FIELD_NAME); } |