Lines Matching refs:expr
83 static struct expr *rewrite_m(struct expr *e) in rewrite_m()
90 e->left.expr = rewrite_m(e->left.expr); in rewrite_m()
94 e->left.expr = rewrite_m(e->left.expr); in rewrite_m()
95 e->right.expr = rewrite_m(e->right.expr); in rewrite_m()
108 void menu_add_dep(struct expr *dep) in menu_add_dep()
129 static struct property *menu_add_prop(enum prop_type type, struct expr *expr, in menu_add_prop() argument
130 struct expr *dep) in menu_add_prop()
140 prop->expr = expr; in menu_add_prop()
141 prop->visible.expr = dep; in menu_add_prop()
158 struct expr *dep) in menu_add_prompt()
175 struct expr *dup_expr; in menu_add_prompt()
188 prop->visible.expr = expr_alloc_and(prop->visible.expr, in menu_add_prompt()
199 void menu_add_visibility(struct expr *expr) in menu_add_visibility() argument
202 expr); in menu_add_visibility()
205 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) in menu_add_expr() argument
207 menu_add_prop(type, expr, dep); in menu_add_expr()
210 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) in menu_add_symbol()
231 prop->expr->type != E_SYMBOL) in sym_check_prop()
235 if (prop->expr->type != E_SYMBOL) in sym_check_prop()
275 if (!menu_validate_number(sym, prop->expr->left.sym) || in sym_check_prop()
276 !menu_validate_number(sym, prop->expr->right.sym)) in sym_check_prop()
290 struct expr *parentdep, *basedep, *dep, *dep2, **ep; in menu_finalize()
379 dep = rewrite_m(prop->visible.expr); in menu_finalize()
385 prop->visible.expr = dep; in menu_finalize()
393 es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, in menu_finalize()
397 es->implied.expr = expr_alloc_or(es->implied.expr, in menu_finalize()
435 basedep = parent->prompt ? parent->prompt->visible.expr : NULL; in menu_finalize()
442 dep = menu->prompt ? menu->prompt->visible.expr : menu->dep; in menu_finalize()
483 sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep); in menu_finalize()
514 prop->visible.expr = expr_alloc_and(expr_copy(basedep), in menu_finalize()
515 prop->visible.expr); in menu_finalize()
520 for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) in menu_finalize()
588 sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, in menu_finalize()
589 expr_alloc_and(parent->prompt->visible.expr, in menu_finalize()
636 visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); in menu_is_visible()
695 static void get_dep_str(struct gstr *r, struct expr *expr, const char *prefix) in get_dep_str() argument
697 if (!expr_is_yes(expr)) { in get_dep_str()
699 expr_gstr_print(expr, r); in get_dep_str()
727 if (!expr_eq(prop->menu->dep, prop->visible.expr)) in get_prompt_str()
728 get_dep_str(r, prop->visible.expr, " Visible if: "); in get_prompt_str()
780 expr_gstr_print(prop->expr, r); in get_symbol_props_str()
802 expr_gstr_print(prop->expr, r); in get_symbol_str()
824 if (sym->rev_dep.expr) { in get_symbol_str()
825 expr_gstr_print_revdep(sym->rev_dep.expr, r, yes, "Selected by [y]:\n"); in get_symbol_str()
826 expr_gstr_print_revdep(sym->rev_dep.expr, r, mod, "Selected by [m]:\n"); in get_symbol_str()
827 expr_gstr_print_revdep(sym->rev_dep.expr, r, no, "Selected by [n]:\n"); in get_symbol_str()
831 if (sym->implied.expr) { in get_symbol_str()
832 expr_gstr_print_revdep(sym->implied.expr, r, yes, "Implied by [y]:\n"); in get_symbol_str()
833 expr_gstr_print_revdep(sym->implied.expr, r, mod, "Implied by [m]:\n"); in get_symbol_str()
834 expr_gstr_print_revdep(sym->implied.expr, r, no, "Implied by [n]:\n"); in get_symbol_str()