1 2 enum token { 3 tok_menuname, 4 tok_menuoption, 5 tok_comment, 6 tok_bool, 7 tok_tristate, 8 tok_dep_tristate, 9 tok_nop, 10 tok_if, 11 tok_else, 12 tok_fi, 13 tok_int, 14 tok_unknown 15 }; 16 17 enum operator { 18 op_eq, 19 op_neq, 20 op_and, 21 op_or, 22 op_bang, 23 op_lparen, 24 op_rparen, 25 op_variable, 26 op_kvariable, 27 op_constant, 28 op_nuked 29 }; 30 31 union var 32 { 33 char * str; 34 struct kconfig * cfg; 35 }; 36 37 struct condition 38 { 39 struct condition * next; 40 enum operator op; 41 union var variable; 42 }; 43 44 #define GLOBAL_WRITTEN 1 45 #define CFG_DUP 2 46 47 struct kconfig 48 { 49 struct kconfig * next; 50 int flags; 51 enum token tok; 52 char menu_number; 53 char menu_line; 54 char submenu_start; 55 char submenu_end; 56 char * optionname; 57 char * dflt; 58 char * label; 59 union var depend; 60 struct condition * cond; 61 }; 62 63 extern struct kconfig * config; 64 extern struct kconfig * clast; 65 extern struct kconfig * koption; 66