parser.y (5ee546594025fc9337e4cc8b79db89f1258cf480) parser.y (a77a05dc9cf24a8c88b9d9c70e8984f936d075f3)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
4 */
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
14#include "lkc.h"
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
4 */
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
14#include "lkc.h"
15#include "internal.h"
15
16#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
17
18#define PRINTD 0x0001
19#define DEBUG_PARSE 0x0002
20
21int cdebug = PRINTD;
22
23static void yyerror(const char *err);
24static void zconfprint(const char *err, ...);
25static void zconf_error(const char *err, ...);
26static bool zconf_endtoken(const char *tokenname,
27 const char *expected_tokenname);
28
29struct symbol *symbol_hash[SYMBOL_HASHSIZE];
30
16
17#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
18
19#define PRINTD 0x0001
20#define DEBUG_PARSE 0x0002
21
22int cdebug = PRINTD;
23
24static void yyerror(const char *err);
25static void zconfprint(const char *err, ...);
26static void zconf_error(const char *err, ...);
27static bool zconf_endtoken(const char *tokenname,
28 const char *expected_tokenname);
29
30struct symbol *symbol_hash[SYMBOL_HASHSIZE];
31
31static struct menu *current_menu, *current_entry;
32struct menu *current_menu, *current_entry;
32
33%}
34
35%union
36{
37 char *string;
38 struct symbol *symbol;
39 struct expr *expr;

--- 668 unchanged lines hidden (view full) ---

708 fputs("\nendmenu\n", out);
709 if (menu->next) {
710 menu = menu->next;
711 break;
712 }
713 }
714 }
715}
33
34%}
35
36%union
37{
38 char *string;
39 struct symbol *symbol;
40 struct expr *expr;

--- 668 unchanged lines hidden (view full) ---

709 fputs("\nendmenu\n", out);
710 if (menu->next) {
711 menu = menu->next;
712 break;
713 }
714 }
715 }
716}
716
717#include "menu.c"