Ok. I didn't make 2.4.0 in 2000. Tough. I tried, but we had some
[davej-history.git] / scripts / tkparse.h
blob1ca16b1852e73e692fe2091c1572737245314da4
1 /*
2 * tkparse.h
3 */
5 /*
6 * Token types (mostly statement types).
7 */
9 enum e_token
11 token_UNKNOWN,
12 token_bool,
13 token_choice_header,
14 token_choice_item,
15 token_comment,
16 token_define_bool,
17 token_define_hex,
18 token_define_int,
19 token_define_string,
20 token_define_tristate,
21 token_dep_bool,
22 token_dep_mbool,
23 token_dep_tristate,
24 token_else,
25 token_endmenu,
26 token_fi,
27 token_hex,
28 token_if,
29 token_int,
30 token_mainmenu_name,
31 token_mainmenu_option,
32 token_source,
33 token_string,
34 token_then,
35 token_tristate,
36 token_unset,
40 * Operator types for conditionals.
43 enum operator
45 op_eq,
46 op_neq,
47 op_and,
48 op_and1,
49 op_or,
50 op_bang,
51 op_lparen,
52 op_rparen,
53 op_constant,
54 op_variable,
55 op_true,
56 op_false,
57 op_nuked
61 * Conditions come in linked lists.
62 * Some operators take strings:
64 * op_constant "foo"
65 * op_variable "$ARCH", "$CONFIG_PMAC", "$CONFIG_EXPERIMENTAL"
67 * Most "$..." constructs refer to a variable which is defined somewhere
68 * in the script. Note that it is legal to test variables which are never
69 * defined, such as variables that are meaningful only on other architectures.
72 struct condition
74 struct condition * next;
75 enum operator op;
76 const char * str; /* op_constant */
77 int nameindex; /* op_variable */
81 * Dependency list for dep_bool, dep_mbool, dep_tristate
84 struct dependency
86 char * name;
87 struct dependency * next;
91 * A statement from a config.in file
94 struct kconfig
96 struct kconfig * next;
97 enum e_token token;
98 int nameindex;
99 char * label;
100 char * value;
101 struct condition * cond;
102 struct dependency * depend; /* token_dep_tristate */
103 struct kconfig * cfg_parent; /* token_choice_item */
105 /* used only in tkgen.c */
106 int menu_number;
107 int menu_line;
108 struct kconfig * menu_next;
111 struct variable
113 char * name;
114 char defined;
115 char global_written;
118 extern struct variable vartable[];
119 extern int max_varnum;
122 * Prototypes
125 extern void fix_conditionals ( struct kconfig * scfg ); /* tkcond.c */
126 extern void dump_tk_script ( struct kconfig * scfg ); /* tkgen.c */
127 extern int get_varnum ( char * name ); /* tkparse.c */