Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | %{ |
| 2 | /* |
| 3 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> |
| 4 | * Released under the terms of the GNU GPL v2.0. |
| 5 | */ |
| 6 | |
| 7 | #include <ctype.h> |
| 8 | #include <stdarg.h> |
| 9 | #include <stdio.h> |
| 10 | #include <stdlib.h> |
| 11 | #include <string.h> |
| 12 | #include <stdbool.h> |
| 13 | |
Roman Zippel | 7a88488 | 2005-11-08 21:34:51 -0800 | [diff] [blame] | 14 | #include "lkc.h" |
| 15 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |
| 17 | |
| 18 | #define PRINTD 0x0001 |
| 19 | #define DEBUG_PARSE 0x0002 |
| 20 | |
| 21 | int cdebug = PRINTD; |
| 22 | |
| 23 | extern int zconflex(void); |
| 24 | static void zconfprint(const char *err, ...); |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 25 | static void zconf_error(const char *err, ...); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | static void zconferror(const char *err); |
Arnaud Lacombe | 61f956f | 2011-05-04 21:14:44 -0400 | [diff] [blame] | 27 | static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | |
Andi Kleen | e66f25d | 2010-01-13 17:02:44 +0100 | [diff] [blame] | 29 | struct symbol *symbol_hash[SYMBOL_HASHSIZE]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | |
| 31 | static struct menu *current_menu, *current_entry; |
| 32 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | %} |
Arnaud Lacombe | 86e187f | 2010-11-06 18:30:23 -0300 | [diff] [blame] | 34 | %expect 30 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
| 36 | %union |
| 37 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | char *string; |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 39 | struct file *file; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | struct symbol *symbol; |
| 41 | struct expr *expr; |
| 42 | struct menu *menu; |
Arnaud Lacombe | 61f956f | 2011-05-04 21:14:44 -0400 | [diff] [blame] | 43 | const struct kconf_id *id; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | } |
| 45 | |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 46 | %token <id>T_MAINMENU |
| 47 | %token <id>T_MENU |
| 48 | %token <id>T_ENDMENU |
| 49 | %token <id>T_SOURCE |
| 50 | %token <id>T_CHOICE |
| 51 | %token <id>T_ENDCHOICE |
| 52 | %token <id>T_COMMENT |
| 53 | %token <id>T_CONFIG |
| 54 | %token <id>T_MENUCONFIG |
| 55 | %token <id>T_HELP |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | %token <string> T_HELPTEXT |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 57 | %token <id>T_IF |
| 58 | %token <id>T_ENDIF |
| 59 | %token <id>T_DEPENDS |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 60 | %token <id>T_OPTIONAL |
| 61 | %token <id>T_PROMPT |
| 62 | %token <id>T_TYPE |
| 63 | %token <id>T_DEFAULT |
| 64 | %token <id>T_SELECT |
| 65 | %token <id>T_RANGE |
Arnaud Lacombe | 86e187f | 2010-11-06 18:30:23 -0300 | [diff] [blame] | 66 | %token <id>T_VISIBLE |
Roman Zippel | f6a88aa | 2006-06-08 22:12:44 -0700 | [diff] [blame] | 67 | %token <id>T_OPTION |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 68 | %token <id>T_ON |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | %token <string> T_WORD |
| 70 | %token <string> T_WORD_QUOTE |
| 71 | %token T_UNEQUAL |
Jan Beulich | 31847b6 | 2015-06-15 13:00:21 +0100 | [diff] [blame] | 72 | %token T_LESS |
| 73 | %token T_LESS_EQUAL |
| 74 | %token T_GREATER |
| 75 | %token T_GREATER_EQUAL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | %token T_CLOSE_PAREN |
| 77 | %token T_OPEN_PAREN |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 78 | %token T_EOL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | |
| 80 | %left T_OR |
| 81 | %left T_AND |
| 82 | %left T_EQUAL T_UNEQUAL |
Jan Beulich | 31847b6 | 2015-06-15 13:00:21 +0100 | [diff] [blame] | 83 | %left T_LESS T_LESS_EQUAL T_GREATER T_GREATER_EQUAL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | %nonassoc T_NOT |
| 85 | |
| 86 | %type <string> prompt |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | %type <symbol> symbol |
| 88 | %type <expr> expr |
| 89 | %type <expr> if_expr |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 90 | %type <id> end |
| 91 | %type <id> option_name |
| 92 | %type <menu> if_entry menu_entry choice_entry |
Roman Zippel | 5a1aa8a | 2008-02-29 05:11:50 +0100 | [diff] [blame] | 93 | %type <string> symbol_option_arg word_opt |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 94 | |
| 95 | %destructor { |
| 96 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", |
| 97 | $$->file->name, $$->lineno); |
| 98 | if (current_menu == $$) |
| 99 | menu_end_menu(); |
| 100 | } if_entry menu_entry choice_entry |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 101 | |
Josh Triplett | 1456edb | 2009-10-15 11:03:20 -0700 | [diff] [blame] | 102 | %{ |
| 103 | /* Include zconf.hash.c here so it can see the token constants. */ |
| 104 | #include "zconf.hash.c" |
| 105 | %} |
| 106 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 | %% |
Arnaud Lacombe | 8ea13e2 | 2010-08-16 22:55:31 -0400 | [diff] [blame] | 108 | input: nl start | start; |
| 109 | |
Ulf Magnusson | d0c1ba1 | 2017-10-08 19:11:21 +0200 | [diff] [blame] | 110 | start: mainmenu_stmt stmt_list | no_mainmenu_stmt stmt_list; |
| 111 | |
| 112 | /* mainmenu entry */ |
| 113 | |
| 114 | mainmenu_stmt: T_MAINMENU prompt nl |
| 115 | { |
| 116 | menu_add_prompt(P_MENU, $2, NULL); |
| 117 | }; |
| 118 | |
| 119 | /* Default main menu, if there's no mainmenu entry */ |
| 120 | |
| 121 | no_mainmenu_stmt: /* empty */ |
| 122 | { |
| 123 | /* |
| 124 | * Hack: Keep the main menu title on the heap so we can safely free it |
| 125 | * later regardless of whether it comes from the 'prompt' in |
| 126 | * mainmenu_stmt or here |
| 127 | */ |
| 128 | menu_add_prompt(P_MENU, strdup("Linux Kernel Configuration"), NULL); |
| 129 | }; |
| 130 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 131 | |
| 132 | stmt_list: |
| 133 | /* empty */ |
| 134 | | stmt_list common_stmt |
| 135 | | stmt_list choice_stmt |
| 136 | | stmt_list menu_stmt |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 137 | | stmt_list end { zconf_error("unexpected end statement"); } |
| 138 | | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } |
| 139 | | stmt_list option_name error T_EOL |
| 140 | { |
| 141 | zconf_error("unexpected option \"%s\"", kconf_id_strings + $2->name); |
| 142 | } |
| 143 | | stmt_list error T_EOL { zconf_error("invalid statement"); } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | ; |
| 145 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 146 | option_name: |
Arnaud Lacombe | 86e187f | 2010-11-06 18:30:23 -0300 | [diff] [blame] | 147 | T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 148 | ; |
| 149 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 150 | common_stmt: |
| 151 | T_EOL |
| 152 | | if_stmt |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 153 | | comment_stmt |
| 154 | | config_stmt |
| 155 | | menuconfig_stmt |
| 156 | | source_stmt |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 157 | ; |
| 158 | |
| 159 | option_error: |
| 160 | T_WORD error T_EOL { zconf_error("unknown option \"%s\"", $1); } |
| 161 | | error T_EOL { zconf_error("invalid option"); } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | ; |
| 163 | |
| 164 | |
| 165 | /* config/menuconfig entry */ |
| 166 | |
| 167 | config_entry_start: T_CONFIG T_WORD T_EOL |
| 168 | { |
| 169 | struct symbol *sym = sym_lookup($2, 0); |
| 170 | sym->flags |= SYMBOL_OPTIONAL; |
| 171 | menu_add_entry(sym); |
| 172 | printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2); |
| 173 | }; |
| 174 | |
| 175 | config_stmt: config_entry_start config_option_list |
| 176 | { |
| 177 | menu_end_entry(); |
| 178 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); |
| 179 | }; |
| 180 | |
| 181 | menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL |
| 182 | { |
| 183 | struct symbol *sym = sym_lookup($2, 0); |
| 184 | sym->flags |= SYMBOL_OPTIONAL; |
| 185 | menu_add_entry(sym); |
| 186 | printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2); |
| 187 | }; |
| 188 | |
| 189 | menuconfig_stmt: menuconfig_entry_start config_option_list |
| 190 | { |
| 191 | if (current_entry->prompt) |
| 192 | current_entry->prompt->type = P_MENU; |
| 193 | else |
| 194 | zconfprint("warning: menuconfig statement without prompt"); |
| 195 | menu_end_entry(); |
| 196 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); |
| 197 | }; |
| 198 | |
| 199 | config_option_list: |
| 200 | /* empty */ |
| 201 | | config_option_list config_option |
Roman Zippel | f6a88aa | 2006-06-08 22:12:44 -0700 | [diff] [blame] | 202 | | config_option_list symbol_option |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | | config_option_list depends |
| 204 | | config_option_list help |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 205 | | config_option_list option_error |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 206 | | config_option_list T_EOL |
| 207 | ; |
| 208 | |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 209 | config_option: T_TYPE prompt_stmt_opt T_EOL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 210 | { |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 211 | menu_set_type($1->stype); |
| 212 | printd(DEBUG_PARSE, "%s:%d:type(%u)\n", |
| 213 | zconf_curname(), zconf_lineno(), |
| 214 | $1->stype); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 215 | }; |
| 216 | |
| 217 | config_option: T_PROMPT prompt if_expr T_EOL |
| 218 | { |
| 219 | menu_add_prompt(P_PROMPT, $2, $3); |
| 220 | printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); |
| 221 | }; |
| 222 | |
| 223 | config_option: T_DEFAULT expr if_expr T_EOL |
| 224 | { |
| 225 | menu_add_expr(P_DEFAULT, $2, $3); |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 226 | if ($1->stype != S_UNKNOWN) |
| 227 | menu_set_type($1->stype); |
| 228 | printd(DEBUG_PARSE, "%s:%d:default(%u)\n", |
| 229 | zconf_curname(), zconf_lineno(), |
| 230 | $1->stype); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 | }; |
| 232 | |
| 233 | config_option: T_SELECT T_WORD if_expr T_EOL |
| 234 | { |
| 235 | menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3); |
| 236 | printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); |
| 237 | }; |
| 238 | |
| 239 | config_option: T_RANGE symbol symbol if_expr T_EOL |
| 240 | { |
| 241 | menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); |
| 242 | printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); |
| 243 | }; |
| 244 | |
Roman Zippel | f6a88aa | 2006-06-08 22:12:44 -0700 | [diff] [blame] | 245 | symbol_option: T_OPTION symbol_option_list T_EOL |
| 246 | ; |
| 247 | |
| 248 | symbol_option_list: |
| 249 | /* empty */ |
| 250 | | symbol_option_list T_WORD symbol_option_arg |
| 251 | { |
Arnaud Lacombe | 61f956f | 2011-05-04 21:14:44 -0400 | [diff] [blame] | 252 | const struct kconf_id *id = kconf_id_lookup($2, strlen($2)); |
Roman Zippel | f6a88aa | 2006-06-08 22:12:44 -0700 | [diff] [blame] | 253 | if (id && id->flags & TF_OPTION) |
| 254 | menu_add_option(id->token, $3); |
| 255 | else |
| 256 | zconfprint("warning: ignoring unknown option %s", $2); |
| 257 | free($2); |
| 258 | }; |
| 259 | |
| 260 | symbol_option_arg: |
| 261 | /* empty */ { $$ = NULL; } |
| 262 | | T_EQUAL prompt { $$ = $2; } |
| 263 | ; |
| 264 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 265 | /* choice entry */ |
| 266 | |
Roman Zippel | 5a1aa8a | 2008-02-29 05:11:50 +0100 | [diff] [blame] | 267 | choice: T_CHOICE word_opt T_EOL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 268 | { |
Roman Zippel | 5a1aa8a | 2008-02-29 05:11:50 +0100 | [diff] [blame] | 269 | struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE); |
| 270 | sym->flags |= SYMBOL_AUTO; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 271 | menu_add_entry(sym); |
| 272 | menu_add_expr(P_CHOICE, NULL, NULL); |
| 273 | printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); |
| 274 | }; |
| 275 | |
| 276 | choice_entry: choice choice_option_list |
| 277 | { |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 278 | $$ = menu_add_menu(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 279 | }; |
| 280 | |
| 281 | choice_end: end |
| 282 | { |
| 283 | if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) { |
| 284 | menu_end_menu(); |
| 285 | printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); |
| 286 | } |
| 287 | }; |
| 288 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 289 | choice_stmt: choice_entry choice_block choice_end |
| 290 | ; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 291 | |
| 292 | choice_option_list: |
| 293 | /* empty */ |
| 294 | | choice_option_list choice_option |
| 295 | | choice_option_list depends |
| 296 | | choice_option_list help |
| 297 | | choice_option_list T_EOL |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 298 | | choice_option_list option_error |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | ; |
| 300 | |
| 301 | choice_option: T_PROMPT prompt if_expr T_EOL |
| 302 | { |
| 303 | menu_add_prompt(P_PROMPT, $2, $3); |
| 304 | printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); |
| 305 | }; |
| 306 | |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 307 | choice_option: T_TYPE prompt_stmt_opt T_EOL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | { |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 309 | if ($1->stype == S_BOOLEAN || $1->stype == S_TRISTATE) { |
| 310 | menu_set_type($1->stype); |
| 311 | printd(DEBUG_PARSE, "%s:%d:type(%u)\n", |
| 312 | zconf_curname(), zconf_lineno(), |
| 313 | $1->stype); |
| 314 | } else |
| 315 | YYERROR; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 316 | }; |
| 317 | |
| 318 | choice_option: T_OPTIONAL T_EOL |
| 319 | { |
| 320 | current_entry->sym->flags |= SYMBOL_OPTIONAL; |
| 321 | printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); |
| 322 | }; |
| 323 | |
| 324 | choice_option: T_DEFAULT T_WORD if_expr T_EOL |
| 325 | { |
Roman Zippel | 3370f9f | 2005-11-08 21:34:52 -0800 | [diff] [blame] | 326 | if ($1->stype == S_UNKNOWN) { |
| 327 | menu_add_symbol(P_DEFAULT, sym_lookup($2, 0), $3); |
| 328 | printd(DEBUG_PARSE, "%s:%d:default\n", |
| 329 | zconf_curname(), zconf_lineno()); |
| 330 | } else |
| 331 | YYERROR; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 332 | }; |
| 333 | |
| 334 | choice_block: |
| 335 | /* empty */ |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 336 | | choice_block common_stmt |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 337 | ; |
| 338 | |
| 339 | /* if entry */ |
| 340 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 341 | if_entry: T_IF expr nl |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 342 | { |
| 343 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); |
| 344 | menu_add_entry(NULL); |
| 345 | menu_add_dep($2); |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 346 | $$ = menu_add_menu(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 347 | }; |
| 348 | |
| 349 | if_end: end |
| 350 | { |
| 351 | if (zconf_endtoken($1, T_IF, T_ENDIF)) { |
| 352 | menu_end_menu(); |
| 353 | printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); |
| 354 | } |
| 355 | }; |
| 356 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 357 | if_stmt: if_entry if_block if_end |
| 358 | ; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 359 | |
| 360 | if_block: |
| 361 | /* empty */ |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 362 | | if_block common_stmt |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 363 | | if_block menu_stmt |
| 364 | | if_block choice_stmt |
| 365 | ; |
| 366 | |
| 367 | /* menu entry */ |
| 368 | |
| 369 | menu: T_MENU prompt T_EOL |
| 370 | { |
| 371 | menu_add_entry(NULL); |
blaisorblade@yahoo.it | fb7f6ff | 2005-07-28 17:56:25 +0200 | [diff] [blame] | 372 | menu_add_prompt(P_MENU, $2, NULL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 373 | printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); |
| 374 | }; |
| 375 | |
Arnaud Lacombe | 86e187f | 2010-11-06 18:30:23 -0300 | [diff] [blame] | 376 | menu_entry: menu visibility_list depends_list |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 377 | { |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 378 | $$ = menu_add_menu(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 379 | }; |
| 380 | |
| 381 | menu_end: end |
| 382 | { |
| 383 | if (zconf_endtoken($1, T_MENU, T_ENDMENU)) { |
| 384 | menu_end_menu(); |
| 385 | printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); |
| 386 | } |
| 387 | }; |
| 388 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 389 | menu_stmt: menu_entry menu_block menu_end |
| 390 | ; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 391 | |
| 392 | menu_block: |
| 393 | /* empty */ |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 394 | | menu_block common_stmt |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 395 | | menu_block menu_stmt |
| 396 | | menu_block choice_stmt |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 397 | ; |
| 398 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 399 | source_stmt: T_SOURCE prompt T_EOL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 400 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 401 | printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 402 | zconf_nextfile($2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 403 | }; |
| 404 | |
| 405 | /* comment entry */ |
| 406 | |
| 407 | comment: T_COMMENT prompt T_EOL |
| 408 | { |
| 409 | menu_add_entry(NULL); |
blaisorblade@yahoo.it | fb7f6ff | 2005-07-28 17:56:25 +0200 | [diff] [blame] | 410 | menu_add_prompt(P_COMMENT, $2, NULL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 411 | printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); |
| 412 | }; |
| 413 | |
| 414 | comment_stmt: comment depends_list |
| 415 | { |
| 416 | menu_end_entry(); |
| 417 | }; |
| 418 | |
| 419 | /* help option */ |
| 420 | |
| 421 | help_start: T_HELP T_EOL |
| 422 | { |
| 423 | printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); |
| 424 | zconf_starthelp(); |
| 425 | }; |
| 426 | |
| 427 | help: help_start T_HELPTEXT |
| 428 | { |
Sam Ravnborg | 03d2912 | 2007-07-21 00:00:36 +0200 | [diff] [blame] | 429 | current_entry->help = $2; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 430 | }; |
| 431 | |
| 432 | /* depends option */ |
| 433 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 434 | depends_list: |
| 435 | /* empty */ |
| 436 | | depends_list depends |
| 437 | | depends_list T_EOL |
| 438 | | depends_list option_error |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 439 | ; |
| 440 | |
| 441 | depends: T_DEPENDS T_ON expr T_EOL |
| 442 | { |
| 443 | menu_add_dep($3); |
| 444 | printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 445 | }; |
| 446 | |
Arnaud Lacombe | 86e187f | 2010-11-06 18:30:23 -0300 | [diff] [blame] | 447 | /* visibility option */ |
| 448 | |
| 449 | visibility_list: |
| 450 | /* empty */ |
| 451 | | visibility_list visible |
| 452 | | visibility_list T_EOL |
| 453 | ; |
| 454 | |
| 455 | visible: T_VISIBLE if_expr |
| 456 | { |
| 457 | menu_add_visibility($2); |
| 458 | }; |
| 459 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 460 | /* prompt statement */ |
| 461 | |
| 462 | prompt_stmt_opt: |
| 463 | /* empty */ |
| 464 | | prompt if_expr |
| 465 | { |
blaisorblade@yahoo.it | fb7f6ff | 2005-07-28 17:56:25 +0200 | [diff] [blame] | 466 | menu_add_prompt(P_PROMPT, $1, $2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 467 | }; |
| 468 | |
| 469 | prompt: T_WORD |
| 470 | | T_WORD_QUOTE |
| 471 | ; |
| 472 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 473 | end: T_ENDMENU T_EOL { $$ = $1; } |
| 474 | | T_ENDCHOICE T_EOL { $$ = $1; } |
| 475 | | T_ENDIF T_EOL { $$ = $1; } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 476 | ; |
| 477 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 478 | nl: |
| 479 | T_EOL |
| 480 | | nl T_EOL |
| 481 | ; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 482 | |
| 483 | if_expr: /* empty */ { $$ = NULL; } |
| 484 | | T_IF expr { $$ = $2; } |
| 485 | ; |
| 486 | |
| 487 | expr: symbol { $$ = expr_alloc_symbol($1); } |
Jan Beulich | 31847b6 | 2015-06-15 13:00:21 +0100 | [diff] [blame] | 488 | | symbol T_LESS symbol { $$ = expr_alloc_comp(E_LTH, $1, $3); } |
| 489 | | symbol T_LESS_EQUAL symbol { $$ = expr_alloc_comp(E_LEQ, $1, $3); } |
| 490 | | symbol T_GREATER symbol { $$ = expr_alloc_comp(E_GTH, $1, $3); } |
| 491 | | symbol T_GREATER_EQUAL symbol { $$ = expr_alloc_comp(E_GEQ, $1, $3); } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 492 | | symbol T_EQUAL symbol { $$ = expr_alloc_comp(E_EQUAL, $1, $3); } |
| 493 | | symbol T_UNEQUAL symbol { $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } |
| 494 | | T_OPEN_PAREN expr T_CLOSE_PAREN { $$ = $2; } |
| 495 | | T_NOT expr { $$ = expr_alloc_one(E_NOT, $2); } |
| 496 | | expr T_OR expr { $$ = expr_alloc_two(E_OR, $1, $3); } |
| 497 | | expr T_AND expr { $$ = expr_alloc_two(E_AND, $1, $3); } |
| 498 | ; |
| 499 | |
| 500 | symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } |
Roman Zippel | 5a1aa8a | 2008-02-29 05:11:50 +0100 | [diff] [blame] | 501 | | T_WORD_QUOTE { $$ = sym_lookup($1, SYMBOL_CONST); free($1); } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 502 | ; |
| 503 | |
Roman Zippel | 5a1aa8a | 2008-02-29 05:11:50 +0100 | [diff] [blame] | 504 | word_opt: /* empty */ { $$ = NULL; } |
| 505 | | T_WORD |
| 506 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 507 | %% |
| 508 | |
| 509 | void conf_parse(const char *name) |
| 510 | { |
Ulf Magnusson | d0c1ba1 | 2017-10-08 19:11:21 +0200 | [diff] [blame] | 511 | const char *tmp; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 512 | struct symbol *sym; |
| 513 | int i; |
| 514 | |
| 515 | zconf_initscan(name); |
| 516 | |
| 517 | sym_init(); |
nir.tzachar@gmail.com | 692d97c | 2009-11-25 12:28:43 +0200 | [diff] [blame] | 518 | _menu_init(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 519 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 520 | if (getenv("ZCONF_DEBUG")) |
| 521 | zconfdebug = 1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 522 | zconfparse(); |
| 523 | if (zconfnerrs) |
| 524 | exit(1); |
Yann E. MORIN | 6902dcc | 2013-09-03 17:07:18 +0200 | [diff] [blame] | 525 | if (!modules_sym) |
| 526 | modules_sym = sym_find( "n" ); |
Arnaud Lacombe | f6ce00b | 2010-09-09 21:17:26 -0400 | [diff] [blame] | 527 | |
Ulf Magnusson | d0c1ba1 | 2017-10-08 19:11:21 +0200 | [diff] [blame] | 528 | tmp = rootmenu.prompt->text; |
Arnaud Lacombe | f6ce00b | 2010-09-09 21:17:26 -0400 | [diff] [blame] | 529 | rootmenu.prompt->text = _(rootmenu.prompt->text); |
| 530 | rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); |
Ulf Magnusson | d0c1ba1 | 2017-10-08 19:11:21 +0200 | [diff] [blame] | 531 | free((char*)tmp); |
Arnaud Lacombe | f6ce00b | 2010-09-09 21:17:26 -0400 | [diff] [blame] | 532 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 533 | menu_finalize(&rootmenu); |
| 534 | for_all_symbols(i, sym) { |
Sam Ravnborg | 5447d34 | 2007-05-06 09:20:10 +0200 | [diff] [blame] | 535 | if (sym_check_deps(sym)) |
| 536 | zconfnerrs++; |
Masahiro Yamada | bb66fc6 | 2014-06-10 19:08:13 +0900 | [diff] [blame] | 537 | } |
Sam Ravnborg | 5447d34 | 2007-05-06 09:20:10 +0200 | [diff] [blame] | 538 | if (zconfnerrs) |
| 539 | exit(1); |
Karsten Wiese | bfc1000 | 2006-12-13 00:34:07 -0800 | [diff] [blame] | 540 | sym_set_change_count(1); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 541 | } |
| 542 | |
Josh Triplett | 6516657 | 2009-10-15 12:13:36 -0700 | [diff] [blame] | 543 | static const char *zconf_tokenname(int token) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 544 | { |
| 545 | switch (token) { |
| 546 | case T_MENU: return "menu"; |
| 547 | case T_ENDMENU: return "endmenu"; |
| 548 | case T_CHOICE: return "choice"; |
| 549 | case T_ENDCHOICE: return "endchoice"; |
| 550 | case T_IF: return "if"; |
| 551 | case T_ENDIF: return "endif"; |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 552 | case T_DEPENDS: return "depends"; |
Arnaud Lacombe | 86e187f | 2010-11-06 18:30:23 -0300 | [diff] [blame] | 553 | case T_VISIBLE: return "visible"; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | } |
| 555 | return "<token>"; |
| 556 | } |
| 557 | |
Arnaud Lacombe | 61f956f | 2011-05-04 21:14:44 -0400 | [diff] [blame] | 558 | static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 559 | { |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 560 | if (id->token != endtoken) { |
| 561 | zconf_error("unexpected '%s' within %s block", |
| 562 | kconf_id_strings + id->name, zconf_tokenname(starttoken)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 563 | zconfnerrs++; |
| 564 | return false; |
| 565 | } |
| 566 | if (current_menu->file != current_file) { |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 567 | zconf_error("'%s' in different file than '%s'", |
| 568 | kconf_id_strings + id->name, zconf_tokenname(starttoken)); |
| 569 | fprintf(stderr, "%s:%d: location of the '%s'\n", |
| 570 | current_menu->file->name, current_menu->lineno, |
| 571 | zconf_tokenname(starttoken)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 572 | zconfnerrs++; |
| 573 | return false; |
| 574 | } |
| 575 | return true; |
| 576 | } |
| 577 | |
| 578 | static void zconfprint(const char *err, ...) |
| 579 | { |
| 580 | va_list ap; |
| 581 | |
Roman Zippel | a02f057 | 2005-11-08 21:34:53 -0800 | [diff] [blame] | 582 | fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); |
| 583 | va_start(ap, err); |
| 584 | vfprintf(stderr, err, ap); |
| 585 | va_end(ap); |
| 586 | fprintf(stderr, "\n"); |
| 587 | } |
| 588 | |
| 589 | static void zconf_error(const char *err, ...) |
| 590 | { |
| 591 | va_list ap; |
| 592 | |
| 593 | zconfnerrs++; |
| 594 | fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 595 | va_start(ap, err); |
| 596 | vfprintf(stderr, err, ap); |
| 597 | va_end(ap); |
| 598 | fprintf(stderr, "\n"); |
| 599 | } |
| 600 | |
| 601 | static void zconferror(const char *err) |
| 602 | { |
| 603 | fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 604 | } |
| 605 | |
Josh Triplett | 6516657 | 2009-10-15 12:13:36 -0700 | [diff] [blame] | 606 | static void print_quoted_string(FILE *out, const char *str) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 607 | { |
| 608 | const char *p; |
| 609 | int len; |
| 610 | |
| 611 | putc('"', out); |
| 612 | while ((p = strchr(str, '"'))) { |
| 613 | len = p - str; |
| 614 | if (len) |
| 615 | fprintf(out, "%.*s", len, str); |
| 616 | fputs("\\\"", out); |
| 617 | str = p + 1; |
| 618 | } |
| 619 | fputs(str, out); |
| 620 | putc('"', out); |
| 621 | } |
| 622 | |
Josh Triplett | 6516657 | 2009-10-15 12:13:36 -0700 | [diff] [blame] | 623 | static void print_symbol(FILE *out, struct menu *menu) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 624 | { |
| 625 | struct symbol *sym = menu->sym; |
| 626 | struct property *prop; |
| 627 | |
| 628 | if (sym_is_choice(sym)) |
Li Zefan | c6ccc30 | 2010-04-14 11:44:20 +0800 | [diff] [blame] | 629 | fprintf(out, "\nchoice\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 630 | else |
Li Zefan | c6ccc30 | 2010-04-14 11:44:20 +0800 | [diff] [blame] | 631 | fprintf(out, "\nconfig %s\n", sym->name); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 632 | switch (sym->type) { |
| 633 | case S_BOOLEAN: |
| 634 | fputs(" boolean\n", out); |
| 635 | break; |
| 636 | case S_TRISTATE: |
| 637 | fputs(" tristate\n", out); |
| 638 | break; |
| 639 | case S_STRING: |
| 640 | fputs(" string\n", out); |
| 641 | break; |
| 642 | case S_INT: |
| 643 | fputs(" integer\n", out); |
| 644 | break; |
| 645 | case S_HEX: |
| 646 | fputs(" hex\n", out); |
| 647 | break; |
| 648 | default: |
| 649 | fputs(" ???\n", out); |
| 650 | break; |
| 651 | } |
| 652 | for (prop = sym->prop; prop; prop = prop->next) { |
| 653 | if (prop->menu != menu) |
| 654 | continue; |
| 655 | switch (prop->type) { |
| 656 | case P_PROMPT: |
| 657 | fputs(" prompt ", out); |
| 658 | print_quoted_string(out, prop->text); |
| 659 | if (!expr_is_yes(prop->visible.expr)) { |
| 660 | fputs(" if ", out); |
| 661 | expr_fprint(prop->visible.expr, out); |
| 662 | } |
| 663 | fputc('\n', out); |
| 664 | break; |
| 665 | case P_DEFAULT: |
| 666 | fputs( " default ", out); |
| 667 | expr_fprint(prop->expr, out); |
| 668 | if (!expr_is_yes(prop->visible.expr)) { |
| 669 | fputs(" if ", out); |
| 670 | expr_fprint(prop->visible.expr, out); |
| 671 | } |
| 672 | fputc('\n', out); |
| 673 | break; |
| 674 | case P_CHOICE: |
| 675 | fputs(" #choice value\n", out); |
| 676 | break; |
Li Zefan | c6ccc30 | 2010-04-14 11:44:20 +0800 | [diff] [blame] | 677 | case P_SELECT: |
| 678 | fputs( " select ", out); |
| 679 | expr_fprint(prop->expr, out); |
| 680 | fputc('\n', out); |
| 681 | break; |
| 682 | case P_RANGE: |
| 683 | fputs( " range ", out); |
| 684 | expr_fprint(prop->expr, out); |
| 685 | fputc('\n', out); |
| 686 | break; |
| 687 | case P_MENU: |
| 688 | fputs( " menu ", out); |
| 689 | print_quoted_string(out, prop->text); |
| 690 | fputc('\n', out); |
| 691 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 692 | default: |
| 693 | fprintf(out, " unknown prop %d!\n", prop->type); |
| 694 | break; |
| 695 | } |
| 696 | } |
Sam Ravnborg | 03d2912 | 2007-07-21 00:00:36 +0200 | [diff] [blame] | 697 | if (menu->help) { |
| 698 | int len = strlen(menu->help); |
| 699 | while (menu->help[--len] == '\n') |
| 700 | menu->help[len] = 0; |
| 701 | fprintf(out, " help\n%s\n", menu->help); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 702 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 703 | } |
| 704 | |
| 705 | void zconfdump(FILE *out) |
| 706 | { |
| 707 | struct property *prop; |
| 708 | struct symbol *sym; |
| 709 | struct menu *menu; |
| 710 | |
| 711 | menu = rootmenu.list; |
| 712 | while (menu) { |
| 713 | if ((sym = menu->sym)) |
| 714 | print_symbol(out, menu); |
| 715 | else if ((prop = menu->prompt)) { |
| 716 | switch (prop->type) { |
| 717 | case P_COMMENT: |
| 718 | fputs("\ncomment ", out); |
| 719 | print_quoted_string(out, prop->text); |
| 720 | fputs("\n", out); |
| 721 | break; |
| 722 | case P_MENU: |
| 723 | fputs("\nmenu ", out); |
| 724 | print_quoted_string(out, prop->text); |
| 725 | fputs("\n", out); |
| 726 | break; |
| 727 | default: |
| 728 | ; |
| 729 | } |
| 730 | if (!expr_is_yes(prop->visible.expr)) { |
| 731 | fputs(" depends ", out); |
| 732 | expr_fprint(prop->visible.expr, out); |
| 733 | fputc('\n', out); |
| 734 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 735 | } |
| 736 | |
| 737 | if (menu->list) |
| 738 | menu = menu->list; |
| 739 | else if (menu->next) |
| 740 | menu = menu->next; |
| 741 | else while ((menu = menu->parent)) { |
| 742 | if (menu->prompt && menu->prompt->type == P_MENU) |
| 743 | fputs("\nendmenu\n", out); |
| 744 | if (menu->next) { |
| 745 | menu = menu->next; |
| 746 | break; |
| 747 | } |
| 748 | } |
| 749 | } |
| 750 | } |
| 751 | |
Arnaud Lacombe | 378dbb2 | 2011-05-23 02:08:52 -0400 | [diff] [blame] | 752 | #include "zconf.lex.c" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 753 | #include "util.c" |
| 754 | #include "confdata.c" |
| 755 | #include "expr.c" |
| 756 | #include "symbol.c" |
| 757 | #include "menu.c" |