| 1934 | |
| 1935 | |
| 1936 | void conf_parse(const char *name) |
| 1937 | { |
| 1938 | struct symbol *sym; |
| 1939 | int i; |
| 1940 | |
| 1941 | zconf_initscan(name); |
| 1942 | |
| 1943 | _menu_init(); |
| 1944 | |
| 1945 | #if YYDEBUG |
| 1946 | if (getenv("ZCONF_DEBUG")) |
| 1947 | yydebug = 1; |
| 1948 | #endif |
| 1949 | yyparse(); |
| 1950 | |
| 1951 | /* Variables are expanded in the parse phase. We can free them here. */ |
| 1952 | variable_all_del(); |
| 1953 | |
| 1954 | if (yynerrs) |
| 1955 | exit(1); |
| 1956 | if (!modules_sym) |
| 1957 | modules_sym = sym_find( "n" ); |
| 1958 | |
| 1959 | if (!menu_has_prompt(&rootmenu)) { |
| 1960 | current_entry = &rootmenu; |
| 1961 | menu_add_prompt(P_MENU, "Main menu", NULL); |
| 1962 | } |
| 1963 | |
| 1964 | menu_finalize(&rootmenu); |
| 1965 | for_all_symbols(i, sym) { |
| 1966 | if (sym_check_deps(sym)) |
| 1967 | yynerrs++; |
| 1968 | } |
| 1969 | if (yynerrs) |
| 1970 | exit(1); |
| 1971 | conf_set_changed(true); |
| 1972 | } |
| 1973 | |
| 1974 | static bool zconf_endtoken(const char *tokenname, |
| 1975 | const char *expected_tokenname) |
no test coverage detected